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

Pass server-side error messages through to the API response #49

Open
jasonwcfan opened this issue Jun 22, 2023 · 2 comments
Open

Pass server-side error messages through to the API response #49

jasonwcfan opened this issue Jun 22, 2023 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@jasonwcfan
Copy link
Contributor

Right now any exceptions that occur server-side are not passed through to the API response. Instead, all server-side errors return error code 500 with no additional details. This can be frustrating for errors that are easily resolved, for example expired API keys or invalid values for certain parameters.

We should pass all server-side error messages through to the API response, and use the appropriate error codes depending on the nature of the exception.

@jasonwcfan jasonwcfan added enhancement New feature or request good first issue Good for newcomers labels Jun 22, 2023
@gautamtata
Copy link

+1. Banged my head for 30 minutes before realizing that I forgot to plug the API key.

@Ayan-Bandyopadhyay
Copy link
Contributor

@gautamtata which version of the python library are you on? The latest version 0.8.0 has error messages: https://pypi.org/project/psychicapi/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants