Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Looking for error handling documentation #618

Closed
jgehrcke opened this issue Aug 21, 2020 · 2 comments
Closed

Looking for error handling documentation #618

jgehrcke opened this issue Aug 21, 2020 · 2 comments
Assignees
Labels
type: docs Improvement to the documentation for an API.

Comments

@jgehrcke
Copy link

jgehrcke commented Aug 21, 2020

Hello! When trying to built a rather robust system using client libraries based on googleapis/nodejs-common then of course it's important to know how these libraries handle errors internally, how they expose errors to the application developer, and how the application developer is then recommended to deal with those errors that the libraries expose.

Specifically, I am missing documentation that describes

  • which errors I can expect by API calls to be thrown, and how to catch them (and only them :-))
  • to which degree transient errors (on TCP level, but also on layer 7) are handled internally by the library (e.g., via retrying), and how I can influence that behavior as an application developer.

One detail question, when developing in TypeScript, for example is: can I rely on the ApiError, and in particular on err instanceof ApiError within an error handler?

Maybe I just didn't find the right document yet?

I want to say that while I could (and will) of course simply try things out an important insight from various years of developing against robust client libraries in other ecosystems is: well-documented error handling specifics give me the warm feeling that I am developing against a well-specified interface, as opposed to developing against ever-changing implementation details.

Also, error handling is hard to get right and it's always good to see how the library authors would do it!

Thanks for help!

@jgehrcke
Copy link
Author

I just found https://googleapis.dev/nodejs/common/3.3.2/classes/ApiError.html which certainly is already a good start -- I think it should be linked to from some error handling discussion in the style of e.g. https://boto3.amazonaws.com/v1/documentation/api/latest/guide/error-handling.html.

@sofisl sofisl added the type: docs Improvement to the documentation for an API. label Aug 21, 2020
@fhinkel fhinkel self-assigned this Dec 8, 2020
@fhinkel
Copy link
Contributor

fhinkel commented Dec 8, 2020

Greetings, we're closing this. Looks like the issue got resolved. Please let us know if the issue needs to be reopened.

@fhinkel fhinkel closed this as completed Dec 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: docs Improvement to the documentation for an API.
Projects
None yet
Development

No branches or pull requests

3 participants