Improve how errors are reported - better stack traces, exceptions #926
Labels
api: datastore
Issues related to the googleapis/nodejs-datastore API.
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: feature request
‘Nice-to-have’ improvement, new feature or different behavior or design.
Hi! This is definitely a feature request to get more visibility into what is going wrong when using the NodeJS Datastore client library.
Is your feature request related to a problem? Please describe.
At various points using the library (using async/await semantics), we've had issues where errors would be thrown. However, our application is fairly large so it can be hard to tell from the stack traces where things are going awry – or even what underlying Datastore API is being handled. For example, this is what one recent production Datastore exception gives us (@google-cloud/datastore version 6.6.2):
Additionally, almost all exceptions thrown by the Datastore client are type
Error
. There is no way to catch Datastore specific exceptions except to ensure any calls to it are very closely enclosed in try/catch and wrapped with another exception.Describe the solution you'd like
Some or all of the following would be nice:
Describe alternatives you've considered
We have mitigated the client throwing bare
Error
by wrapping all call sites with our own exception. Note the issue is not that the exception is being thrown, bu that it's fairly non-trivial to figure out what call point it's happening from and whether we need to change anything to address it.Thank you!
Rachael Ludwick (from Glowforge)
The text was updated successfully, but these errors were encountered: