mirror of
https://github.com/valitydev/adapter-common-lib.git
synced 2024-11-06 02:05:18 +00:00
Fix error with woody.error-reason header (#54)
This commit is contained in:
parent
42a2972d9e
commit
873515a8cb
2
pom.xml
2
pom.xml
@ -12,7 +12,7 @@
|
||||
</parent>
|
||||
|
||||
<artifactId>adapter-common-lib</artifactId>
|
||||
<version>1.2.8</version>
|
||||
<version>1.2.9</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>adapter-common-lib</name>
|
||||
|
@ -133,11 +133,12 @@ public class ErrorMapping {
|
||||
}
|
||||
|
||||
private WRuntimeException getUnexpectedError(String code, String description, String state) {
|
||||
String errorMessage = String.format("Unexpected result, code = %s, description = %s, state = %s",
|
||||
code, description, state);
|
||||
|
||||
var errorDefinition = new WErrorDefinition(WErrorSource.INTERNAL);
|
||||
errorDefinition.setErrorType(WErrorType.UNEXPECTED_ERROR);
|
||||
return new WRuntimeException(
|
||||
String.format("Unexpected result, code = %s, description = %s, state = %s",
|
||||
code, description, state),
|
||||
errorDefinition);
|
||||
errorDefinition.setErrorReason(errorMessage);
|
||||
return new WRuntimeException(errorMessage, errorDefinition);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user