Open romanstrobl opened 3 years ago
The use case of custom error handling can be handled in the client code, see: https://github.com/wultra/powerauth-webflow/blob/3c0a09da6a6f02ea1ade00c37c8b85625c85d460/powerauth-nextstep-client/src/main/java/io/getlime/security/powerauth/lib/nextstep/client/NextStepClientException.java#L131
Although this solution is far from ideal when considering the code style, technically it work fine, so we can postpone this issue to the next release.
The
DefaultRestClient
can currently deserialize only theErrorResponse
type, 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.