actix / actix/actix-website

Missing documentation regarding actix-web's default error responses

Offen
#386 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
good-first-issue help-wanted
Vorherrschende Sprache
HTML
Sterne
210
Forks
283
Ø Merge
18 Std. 33 Min.
Gemergte PRs (30 T.)
8

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.