diff --git a/src/SlmMail/Service/PostageService.php b/src/SlmMail/Service/PostageService.php index d098ee6..399691c 100644 --- a/src/SlmMail/Service/PostageService.php +++ b/src/SlmMail/Service/PostageService.php @@ -306,7 +306,7 @@ private function parseResponse(HttpResponse $response) throw new Exception\RuntimeException(sprintf( 'An error occurred on Postage, status code: %s%s', $result['response']['status'], ($errors) ? ' (' . $errors . ')' : '' - )); + ), (int) $result['response']['status']); } } diff --git a/src/SlmMail/Service/PostmarkService.php b/src/SlmMail/Service/PostmarkService.php index 214cd5e..579d9cf 100644 --- a/src/SlmMail/Service/PostmarkService.php +++ b/src/SlmMail/Service/PostmarkService.php @@ -343,7 +343,7 @@ private function parseResponse(HttpResponse $response) case 422: throw new Exception\ValidationErrorException(sprintf( 'An error occured on Postmark (error code %s), message: %s', $result['ErrorCode'], $result['Message'] - )); + ), (int) $result['ErrorCode']); case 500: throw new Exception\RuntimeException('Postmark server error, please try again'); default: