Skip to content

Uncaught Exception Error - Database Not Found #2238

@alkatrivedi

Description

@alkatrivedi

Please make sure you have searched for information in the following guides.

A screenshot that you have tested with "Try this API".

wrt PR - #2214

This is understood that if we are getting reference to cloud spanner database using const database = instance.database(databaseId); the database needs to be exists already

but if we are getting reference to database which doesn't exists, it is throwing an unhandled exception error

Error: 5 NOT_FOUND: Database not found

Link to the code that reproduces this issue. A link to a public Github Repository or gist with a minimal reproduction.

https://github.com/googleapis/nodejs-spanner/blob/main/samples/crud.js#L187-#L229

A step-by-step description of how to reproduce the issue, based on the linked reproduction.

Run the sample queryData and pass the databaseId which doesn't exists

A clear and concise description of what the bug is, and what you expected to happen.

Image

A clear and concise description WHY you expect this behavior, i.e., was it a recent change, there is documentation that points to this behavior, etc. **

It is triggering Uncaught Exception which needs to be handle properly

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/nodejs-spanner API.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions