Skip to content

Commit 292b3ae

Browse files
committed
cast Error to string
1 parent 925e9d2 commit 292b3ae

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Service/ResponseProcessor/Rest/AbstractRestResponseProcessor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ protected function validateResponse(ResponseInterface $response): bool
109109
}
110110
throw new CifException(message: $exceptionData);
111111
} elseif (!empty($body->Error)) {
112-
throw new CifException(message: $body->Error->ErrorDescription, code: $body->Error->ErrorCode);
112+
throw new CifException(message: (string) $body->Error->ErrorDescription, code: (int) $body->Error->ErrorCode);
113113
} elseif (!empty($body->Array->Item->ErrorMsg)) {
114114
// {"Array":{"Item":{"ErrorMsg":"Unknown option GetDeliveryDate.Options='DayTime' specified","ErrorNumber":26}}}
115115
$exceptionData = [

0 commit comments

Comments
 (0)