Skip to content
This repository was archived by the owner on Feb 20, 2026. It is now read-only.

chore(docs): add an Error handling sample#466

Merged
bcoe merged 30 commits into
googleapis:masterfrom
vishald123:master
Sep 5, 2019
Merged

chore(docs): add an Error handling sample#466
bcoe merged 30 commits into
googleapis:masterfrom
vishald123:master

Conversation

@vishald123
Copy link
Copy Markdown
Contributor

@vishald123 vishald123 commented Jul 30, 2019

Fixes #83 (it's a good idea to open an issue first for discussion)

  • Tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

@googlebot
Copy link
Copy Markdown

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it!) and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added the cla: no This human has *not* signed the Contributor License Agreement. label Jul 30, 2019
@vishald123 vishald123 changed the title Pull request for following issue: Improve the Error handling sample and add more documentation Jul 30, 2019
@vishald123
Copy link
Copy Markdown
Contributor Author

Pull request for the following issue:
#83

@vishald123 vishald123 changed the title Improve the Error handling sample and add more documentation Improve the Error handling sample and add more documentation Jul 31, 2019
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 31, 2019

Codecov Report

Merging #466 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #466   +/-   ##
=======================================
  Coverage   97.97%   97.97%           
=======================================
  Files           6        6           
  Lines         691      691           
  Branches      161      161           
=======================================
  Hits          677      677           
  Misses          2        2           
  Partials       12       12

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1cf85ea...19bb7bb. Read the comment docs.

@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jul 31, 2019
@stephenplusplus
Copy link
Copy Markdown
Contributor

Looks good. So, did we delete this sample file at some point, and now we're bringing it back?

@AVaksman
Copy link
Copy Markdown
Contributor

Looks good. So, did we delete this sample file at some point, and now we're bringing it back?

It was deleted some time ago #110.
And now it looks like there is a request to add it back (link)

@stephenplusplus
Copy link
Copy Markdown
Contributor

How can we make sure this new sample will have a home on the docs site and not be axed again?

@AVaksman
Copy link
Copy Markdown
Contributor

Perhaps bring it up on the chat and ask Frank Natividad?

@stephenplusplus
Copy link
Copy Markdown
Contributor

cc @frankyn!

@frankyn
Copy link
Copy Markdown

frankyn commented Jul 31, 2019

Summoning my colleague @BenWhitehead, who is my point person for Datastore/Firestore related DevEx.

@BenWhitehead
Copy link
Copy Markdown
Contributor

I'll poke around in docsite and figure out how/where this was published before and circle back.

@googlebot
Copy link
Copy Markdown

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Aug 2, 2019
@AVaksman AVaksman added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 2, 2019
@AVaksman
Copy link
Copy Markdown
Contributor

AVaksman commented Aug 2, 2019

@googlebot I consent.

@googlebot
Copy link
Copy Markdown

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@AVaksman AVaksman removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 5, 2019
Copy link
Copy Markdown

@bcoe bcoe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is awesome, another sample is always appreciated.

Comment thread samples/error.js Outdated

const query = datastore.createQuery(['Company']).start('badrequest');

return datastore
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we tend to use an async function called main these days, here's a sample from the guidelines document:

function main(arg1 = 'default_value_one', arg2 = 1234) {
  // [START your_region_tag]
  /**
   * TODO(developer): Uncomment these variables before running the sample.
   */
  // const arg1 = 'default_value_one';
  // const arg2 = 1234;

  // Imports the Google Cloud Some API library
  const {SomeApiClient} = require('@google-cloud/some-api');

  // Instantiates a client
  const someApiClient = new SomeApiClient();

  async function doSomething() {
    ...
  }

  doSomething();
  // [END your_region_tag]
}

main(...process.argv.slice(2));

@AVaksman AVaksman changed the title Improve the Error handling sample and add more documentation chore(docs): add an Error handling sample Aug 13, 2019
@AVaksman AVaksman added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 22, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 22, 2019
@AVaksman AVaksman added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 23, 2019
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Aug 23, 2019
@bcoe bcoe merged commit 0a16206 into googleapis:master Sep 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve the Error handling sample and add more documentation

8 participants