Package com.pain001.sdk
Class GenerationRefusedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.pain001.sdk.Pain001ApiException
com.pain001.sdk.GenerationRefusedException
- All Implemented Interfaces:
Serializable
The server refused to generate a file from the data: HTTP 422 with
success: false.
Since pain001 0.0.87, generate answers 422 when rows fail validation or a scheme
rule. The body carries the findings, not a detail, so Pain001ApiException.detail() is JSON null and
response() holds the decoded body: GenerateResponse.validationErrors() and
GenerateResponse.schemeViolations(). Catching Pain001ApiException still catches
this. The message names only the status, method and path, so it is safe to log.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGenerationRefusedException(GenerateResponse response, String method, String path) Creates the exception. -
Method Summary
Methods inherited from class com.pain001.sdk.Pain001ApiException
detail, statusMethods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
GenerationRefusedException
Creates the exception.- Parameters:
response- the decoded refusal bodymethod- the HTTP method of the refused requestpath- the path of the refused request
-
-
Method Details
-
response
The decoded refusal.- Returns:
- the body:
successfalse, no XML, and the findings
-