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

Better reporting of code errors, JSDoc throws annotation #262

Closed
pepa-linha opened this issue Dec 16, 2023 · 1 comment
Closed

Better reporting of code errors, JSDoc throws annotation #262

pepa-linha opened this issue Dec 16, 2023 · 1 comment

Comments

@pepa-linha
Copy link

Hi, according to the documentation

https://github.com/pocketbase/js-sdk?tab=readme-ov-file#error-handling

in fact, every method on the collection can throw a ClientResponseError error, which is fine, but I would expect such information in the code to catch such errors.

I would therefore expect an annotation for such methods

@throws {ClientResponseError}

What do you think?

(For example, such an error can occur if I do not have a server with Pocketbase running. In short, all calls must be wrapped in a try-catch.)

@ganigeorgiev
Copy link
Member

Note that every Promise can throw, but I'll document the exception with the next minor release sometime later today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants