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

Missing documentation regarding actix-web's default error responses #386

Open
dennisorlando opened this issue May 24, 2024 · 3 comments
Open
Labels
good-first-issue Good for newcomers help-wanted Extra attention is needed

Comments

@dennisorlando
Copy link

Hi, this is issue is related to missing documentation thus it's not an actual bug report. I would be happy to move this discussion to whatever place is the best.

Actix.rs has no documentation regarding HTTP error responses which are a result of a failed extraction of data using an Extractor.
For example, when using the Json extractor, actix-web automatically responds with an HTTP error response containing "Failed to deserialize..." (can't remember the exact message) whenever the request can't be deserialized with serde.

I would expect a section in the "Extractors/Json" page describing this error, it's code, and the exact origin of the message contained in it's body, such as:
"If serde can't deserialize the data contained in json, a 400 response will be generated with details regarding the serde_json::Error result obtained from the deserializatione error"

This causes API specification problems and incongruencies since the API designer didn't think about the error responses which are automatically generated by actix, thus not manually implemented by the developers.

@robjtede robjtede added help-wanted Extra attention is needed good-first-issue Good for newcomers labels Jun 7, 2024
@robjtede robjtede transferred this issue from actix/actix-web Jun 7, 2024
@amiii123malviya
Copy link

Hello,

Is this issue still active?
I would like to work on this.

Best Regards.

@dennisorlando
Copy link
Author

Hello,

Is this issue still active? I would like to work on this.

Best Regards.

I think so yeah, the problem is still there

@amiii123malviya
Copy link

I am working this .
Best regards

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Good for newcomers help-wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants