The DefaultRestClient can currently deserialize only the ErrorResponse type, but it fails to deserialize subtypes of the ErrorResponse. We should introduce a configuration option which allows to map error codes to types dynamically and allow to deserialize custom error responses which usually contain additional error data such as validation errors.
The
DefaultRestClientcan currently deserialize only theErrorResponsetype, but it fails to deserialize subtypes of theErrorResponse. We should introduce a configuration option which allows to map error codes to types dynamically and allow to deserialize custom error responses which usually contain additional error data such as validation errors.