GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — bigtable: throw when required information is missing by stephenplusplus · Pull Request #1452 · googleapis/google-cloud-node

Conversation

@stephenplusplus

@stephenplusplus stephenplusplus commented Jul 26, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

In Bigtable, we should throw whenever data that is required is not provided. I tried to find those places, but @callmehiphop, could you take a look and let me know if I missed any?

To Dos

  • Throw
    • Bigtable
    • Bigtable#createTable
    • row#createRules
    • table#createFamily
    • table#family
    • table#row
  • Unit tests

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@stephenplusplus stephenplusplus added the api: bigtable Issues related to the Bigtable API. label Jul 26, 2016
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jul 26, 2016
@callmehiphop

callmehiphop commented Jul 26, 2016

Copy link
Copy Markdown
Contributor

Can you clarify what kind of data you want to throw for? For example, in Row#increment we don't throw if a user were to provide a bad type for the column value - your changes make me think you only want to throw an error where grpc/upstream errors can't give back a detailed message of what is wrong.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus

stephenplusplus commented Jul 26, 2016

Copy link
Copy Markdown
Contributor Author

Can you clarify what kind of data you want to throw for?

Somewhere between "let the API handle it all" and "validate all user input". In places like "create____", we know that it's impossible to create a "____" without a name. So, we should blow up and let the user know.

We especially should throw in all cases where our code assumes we have the input and tries to manipulate it, e.g., "create____" takes a string, but it needs to be uppercased, so our code throws on the line we tried to use their input, instead of throwing that their input was wrong and how to fix it.

With increment, it's a judgement call. What do you think?

your changes make me think you only want to throw an error where grpc/upstream errors can't give back a detailed message of what is wrong.

Not exactly, but where possible, the API should do the error reporting for us. I do want to catch completely obvious things, basically falling under the label of "you used OUR API wrong", so not things like "does the name match some regex that is enforced by the API".

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@callmehiphop

callmehiphop commented Jul 26, 2016

Copy link
Copy Markdown
Contributor

Thanks for that. I think some places you'd definitely want to look at are

  • Row constructor - name param.
  • Family constructor - name param.

Possible maybes are

  • Row#createRules - rules param.
  • Row#filter - filter param.
  • Row#deleteCells - columns param.
  • Row#increment - column param.
  • Row#save - key param.
  • Family#setMetadata - metadata param.
  • Table#insert - entries param.
  • Table#mutate - entries param.
stephenplusplus reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus stephenplusplus added the don't merge label Jul 28, 2016
@stephenplusplus
stephenplusplus force-pushed the spp--bigtable-throw branch 2 times, most recently from 7c38290 to 6db2121 Compare August 4, 2016 20:45
@stephenplusplus stephenplusplus removed the don't merge label Aug 4, 2016
@stephenplusplus
stephenplusplus force-pushed the spp--bigtable-throw branch from 6db2121 to 8c6312a Compare August 4, 2016 20:48
@stephenplusplus stephenplusplus assigned callmehiphop Aug 4, 2016
callmehiphop
callmehiphop reviewed Aug 5, 2016
View reviewed changes
Comment thread packages/bigtable/src/index.js
options = {};
}

if (!name) {

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--bigtable-throw branch from 8c6312a to 2f2c312 Compare August 5, 2016 17:41
@callmehiphop

callmehiphop commented Aug 5, 2016

Copy link
Copy Markdown
Contributor

LGTM, waiting for CI.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@coveralls

coveralls commented Aug 5, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.02%) to 99.982% when pulling 2f2c312 on stephenplusplus:spp--bigtable-throw into 143f120 on GoogleCloudPlatform:master.

callmehiphop and stephenplusplus reacted with confused emoji
All reactions
  • 😕 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

callmehiphop
callmehiphop reviewed Aug 5, 2016
View reviewed changes
Comment thread packages/bigtable/test/index.js Outdated

it('should throw if a cluster is not provided', function() {
assert.throws(function() {
new Bigtable();

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This comment was marked as spam.

Sign in to view

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--bigtable-throw branch from 2f2c312 to a0bca00 Compare August 5, 2016 20:31
@stephenplusplus

stephenplusplus commented Aug 5, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

I snuck in a change to add a covers npm script as well here.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus force-pushed the spp--bigtable-throw branch from a0bca00 to 6c84c95 Compare August 6, 2016 00:31
@stephenplusplus
bigtable: throw when required information is missing
dc5e6a5
@stephenplusplus
stephenplusplus force-pushed the spp--bigtable-throw branch from 6c84c95 to dc5e6a5 Compare August 6, 2016 00:39
@coveralls

coveralls commented Aug 6, 2016 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Coverage Status

Coverage remained the same at 100.0% when pulling dc5e6a5 on stephenplusplus:spp--bigtable-throw into 143f120 on GoogleCloudPlatform:master.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@stephenplusplus
stephenplusplus merged commit 0ea26b0 into googleapis:master Aug 7, 2016
stephenplusplus added a commit to stephenplusplus/gcloud-node that referenced this pull request Aug 23, 2016
@stephenplusplus
bigtable: throw when required information is missing (googleapis#1452)
9e3c753
sofisl pushed a commit that referenced this pull request Feb 24, 2026
@release-please
chore: release 4.9.9 (#1452)
3c2803f
Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
sofisl pushed a commit that referenced this pull request Feb 26, 2026
Benjamin E. Coe
fix(deps): google-gax v2.24.1 (#1452)
921b7ac
sofisl pushed a commit that referenced this pull request Feb 26, 2026
@release-please
chore: release 5.13.1 (#1453)
a562aff
🤖 I have created a release \*beep\* \*boop\*
---
### [5.13.1](https://www.github.com/googleapis/nodejs-spanner/compare/v5.13.0...v5.13.1) (2021-08-17)


### Bug Fixes

* **deps:** google-gax v2.24.1 ([#1452](https://www.github.com/googleapis/nodejs-spanner/issues/1452)) ([7379eb2](https://www.github.com/googleapis/nodejs-spanner/commit/7379eb260a8fe4a37b71ccf9ad9e2e17d9669c5f))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
sofisl pushed a commit that referenced this pull request Feb 26, 2026
@gcf-owl-bot @gcf-merge-on-green
chore(deps): update dependency python to v3.10.5 (#1452) (#1649)
32edaea
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
Source-Link: googleapis/synthtool@c02e94b
Post-Processor: gcr.io/cloud-devrel-public-resources/owlbot-nodejs:latest@sha256:3f802f47bce31df4ee6b9513ca085a049347dba6837a4bdfa411b77ae0a9bc43

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: gcf-merge-on-green[bot] <60162190+gcf-merge-on-green[bot]@users.noreply.github.com>
GautamSharda pushed a commit that referenced this pull request Mar 5, 2026
@renovate-bot
chore(deps): update dependency sinon to v16 (#1452)
9fdedae
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@renovate-bot
fix(deps): update dependency google-gax to v2.29.0 (#1452)
57f8072
[![WhiteSource Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [google-gax](https://togithub.com/googleapis/gax-nodejs) | [`2.28.1` -> `2.29.0`](https://renovatebot.com/diffs/npm/google-gax/2.28.1/2.29.0) | [![age](https://badges.renovateapi.com/packages/npm/google-gax/2.29.0/age-slim)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://badges.renovateapi.com/packages/npm/google-gax/2.29.0/adoption-slim)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://badges.renovateapi.com/packages/npm/google-gax/2.29.0/compatibility-slim/2.28.1)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://badges.renovateapi.com/packages/npm/google-gax/2.29.0/confidence-slim/2.28.1)](https://docs.renovatebot.com/merge-confidence/) |

---

### Release Notes

<details>
<summary>googleapis/gax-nodejs</summary>

### [`v2.29.0`](https://togithub.com/googleapis/gax-nodejs/blob/HEAD/CHANGELOG.md#&#8203;2290-httpswwwgithubcomgoogleapisgax-nodejscomparev2281v2290-2022-01-05)

[Compare Source](https://togithub.com/googleapis/gax-nodejs/compare/v2.28.1...v2.29.0)

##### Features

-   map http status code to grpc status code ([#&#8203;1135](https://www.togithub.com/googleapis/gax-nodejs/issues/1135)) ([772222f](https://www.github.com/googleapis/gax-nodejs/commit/772222f1d2e269ceb96bce71c0f18942507f3d4b))
-   support server stream for REST ([#&#8203;1122](https://www.togithub.com/googleapis/gax-nodejs/issues/1122)) ([9f62723](https://www.github.com/googleapis/gax-nodejs/commit/9f62723762eb72566997e6c8518517e8efddd62d))

##### [2.28.1](https://www.github.com/googleapis/gax-nodejs/compare/v2.28.0...v2.28.1) (2021-11-10)

##### Bug Fixes

-   handle stream has no metadata event ([#&#8203;1132](https://www.togithub.com/googleapis/gax-nodejs/issues/1132)) ([ad29bc2](https://www.github.com/googleapis/gax-nodejs/commit/ad29bc26567b588d5d694350844bea5de40963d6))

</details>

---

### Configuration

📅 **Schedule**: "after 9am and before 3pm" (UTC).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Renovate will not automatically rebase this PR, because other commits have been found.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, click this checkbox.

---

This PR has been generated by [WhiteSource Renovate](https://renovate.whitesourcesoftware.com). View repository job log [here](https://app.renovatebot.com/dashboard#github/googleapis/nodejs-pubsub).
GautamSharda pushed a commit that referenced this pull request Mar 11, 2026
@release-please
chore(main): release 2.18.5 (#1467)
782f477
🤖 I have created a release *beep* *boop*
---


### [2.18.5](googleapis/nodejs-pubsub@v2.18.4...v2.18.5) (2022-01-21)


### Bug Fixes

* **deps:** update dependency @opentelemetry/semantic-conventions to v1 ([#1407](googleapis/nodejs-pubsub#1407)) ([740d78c](googleapis/nodejs-pubsub@740d78c))
* **deps:** update dependency google-gax to v2.29.0 ([#1452](googleapis/nodejs-pubsub#1452)) ([f419137](googleapis/nodejs-pubsub@f419137))
* **deps:** update dependency google-gax to v2.29.4 ([#1469](googleapis/nodejs-pubsub#1469)) ([8abbfa7](googleapis/nodejs-pubsub@8abbfa7))
* update to work with latest node types (changed the return type of Stream.destroy()) ([#1464](googleapis/nodejs-pubsub#1464)) ([fddc2e7](googleapis/nodejs-pubsub@fddc2e7))

---
This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please).
GautamSharda pushed a commit that referenced this pull request Mar 23, 2026
@stephenplusplus
bigtable: throw when required information is missing (#1452)
5bcfa97
@GautamSharda GautamSharda mentioned this pull request Mar 23, 2026
migrate code from googleapis/nodejs-bigtable #7852
Merged
4 tasks
GautamSharda pushed a commit that referenced this pull request Mar 25, 2026
@stephenplusplus @GautamSharda
bigtable: throw when required information is missing (#1452)
a5c1f9b
shivanee-p pushed a commit that referenced this pull request Mar 27, 2026
@stephenplusplus @shivanee-p
bigtable: throw when required information is missing (#1452)
1077048
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@callmehiphop callmehiphop

Labels

api: bigtable Issues related to the Bigtable API. cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@stephenplusplus @callmehiphop @coveralls @googlebot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.