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.