athena-framework / athena

An ecosystem of reusable, independent components
https://athenaframework.org
MIT License
211 stars 17 forks source link

Request body converter bad request error response is misleading #290

Open Blacksmoke16 opened 1 year ago

Blacksmoke16 commented 1 year ago

The request body converter may return a Malformed JSON payload. 400 response if deserializing the data fails. This error is a bit misleading in that it suggests the data is malformed, when it could also just be incompatible with the related type. E.g. missing some required properties.

It should probably use a more generic error message, or more ideally be able to discern these two contexts.