diff --git a/src/Response.php b/src/Response.php index bdd3318..17b66e8 100644 --- a/src/Response.php +++ b/src/Response.php @@ -310,7 +310,10 @@ public function assertResponseXML($value, $schema) ); } if (empty($invalidBodyError) == false) { - throw new $exceptionClassName($invalidBodyError); + throw new $exceptionClassName( + $invalidBodyError, + "Invalid XML Response body" + ); } } }; @@ -340,7 +343,8 @@ public function assertResponseJSON($value, $schema) $validator = new JsonValidator($value, $schema); if($validator->fails()) { throw new InvalidResponsePayloadBodyException( - $validator->getErrors() + $validator->getErrors(), + "Invalid JSON response body" ); } }