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

Bug: new ResponseError("message") consumes the message #286

Open
2 tasks done
LucyEgan opened this issue Jun 21, 2024 · 0 comments
Open
2 tasks done

Bug: new ResponseError("message") consumes the message #286

LucyEgan opened this issue Jun 21, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@LucyEgan
Copy link

Describe the bug

When a error has been created with new ResponseError("message"), the message is removed in the stack trace, and only accessible via .message compared to normally when a Error is .toString()ed

Steps to reproduce

console.error('Something broke', error); << where error is of the type ResponseError

console.error('Something broke', new ResponseError('some database error'));

^^ above returns

Something broke ResponseError
    at <anonymous>:1:34

Expected behaviour

Something broke ResponseError: some database error
    at <anonymous>:1:34

SurrealDB version

2.0.0-alpha.2 for linux on x86_64

SurrealDB.js version

1.0.0-beta.9

Contact Details

[email protected]

Is there an existing issue for this?

  • I have searched the existing issues

Code of Conduct

  • I agree to follow this project's Code of Conduct
@LucyEgan LucyEgan added the bug Something isn't working label Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant