Skip to content

Export WaspHttpError from wasp/client/api #2767

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

Open
infomiho opened this issue May 19, 2025 · 1 comment
Open

Export WaspHttpError from wasp/client/api #2767

infomiho opened this issue May 19, 2025 · 1 comment
Labels
shouldfix We should do/fix this at some point

Comments

@infomiho
Copy link
Contributor

infomiho commented May 19, 2025

The signup and login functions that are available to the user can throw the WaspHttpError, but users can't import this class. It's useful for users to import his class to be able check if a thrown error is an instance of WaspHttpError.

The error is thrown from the handleApiError fn: https://github.com/wasp-lang/wasp/blob/main/waspc/data/Generator/templates/sdk/wasp/api/index.ts#L110

@infomiho infomiho added the shouldfix We should do/fix this at some point label May 19, 2025
@infomiho
Copy link
Contributor Author

Make sure to update Waspello error handling after this is done to avoid using error: any:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
shouldfix We should do/fix this at some point
Projects
None yet
Development

No branches or pull requests

1 participant