8000 [API] Handle internal server errors and give out error messages · Issue #214 · mwmbl/mwmbl · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[API] Handle internal server errors and give out error messages #214

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 stateme 8000 nt. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
xynydev opened this issue Nov 16, 2024 · 2 comments
Open

[API] Handle internal server errors and give out error messages #214

xynydev opened this issue Nov 16, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@xynydev
Copy link
xynydev commented Nov 16, 2024

When calling an API endpoint results in an internal server error, there's no way to know what the error was.

It would be great to implement some error handling, and return a JSON { message: string } object with the error message in case an error is caught. Returning error code 500 is fine.

@daoudclarke daoudclarke added the bug Something isn't working label Jan 26, 2025
@daoudclarke
Copy link
Contributor

Just trying to fix this but struggling to reproduce! Can you give some example requests that cause this issue?

@xynydev
Copy link
Author
xynydev commented Jan 30, 2025

Oh yeah, I should probably have included such a request in the issue... I don't remember anymore, but I'll post here if I run into it again.

I just tested out some of the public API endpoints with curl but was unable to reproduce either. I'm pretty sure this error occurred when passing in some invalid inputs to some endpoint.