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

Return a different Error Code when JSON object could not be composed #2322

Closed
liquidiert opened this issue Nov 9, 2024 · 1 comment
Closed

Comments

@liquidiert
Copy link

liquidiert commented Nov 9, 2024

Request Statement

When Dio fails to compose a JSON object (say the toJson function of the object in question is faulty) it returns an error 500 leading to believe the server couldn't handle the request. Without the log interceptor this can be very confusing.

Solution Brainstorm

Use a different error code to indicate to the developer that the client is the problem:

  • maybe 451 (Unavailable for legal Reasons) because it would be funny
  • and more serious 499 (client closed request)
@liquidiert liquidiert added the s: feature This issue indicates a feature request label Nov 9, 2024
@AlexV525
Copy link
Member

AlexV525 commented Nov 9, 2024

We don't manipulate responses. Please provide a minimal reproducible example and submit the issue using the correct issue template (BUG report).

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Nov 9, 2024
@AlexV525 AlexV525 added i: not following issue template and removed s: feature This issue indicates a feature request labels Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants