surrealdb / surrealdb.js

SurrealDB SDK for JavaScript
https://surrealdb.com
Apache License 2.0
271 stars 46 forks source link

Explicit error when namespace and/or database are missing for HTTP engine #257

Closed kearfy closed 2 months ago

kearfy commented 2 months ago

Thank you for submitting this pull request! We appreciate you spending the time to work on these changes.

What is the motivation?

When no namespace and/or database is set a ConnectionUnavailable error will be thrown, this can be confusing as it does not clearly represent the problem.

What does this change do?

It introduces a new MissingNamespaceDatabase error with a better description of what the problem is.

What is your testing strategy?

N/A

Is this related to any issues?

fixes #245

Have you read the Contributing Guidelines?