surrealdb / surrealdb.js

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

Fix errors #308

Closed kearfy closed 1 month ago

kearfy commented 1 month ago

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

What is the motivation?

convertAuth threw an error if a namespace was specified, while database was omitted.

What does this change do?

It makes database optional, and additionally some generic Error instances are now converted to SurrealDbError

What is your testing strategy?

Added a test for convertAuth

Is this related to any issues?

No

Have you read the Contributing Guidelines?