diff --git a/src/PSR7/Exception/Validation/InvalidBody.php b/src/PSR7/Exception/Validation/InvalidBody.php index 1cdd6f15..4f1743b0 100644 --- a/src/PSR7/Exception/Validation/InvalidBody.php +++ b/src/PSR7/Exception/Validation/InvalidBody.php @@ -17,7 +17,12 @@ public static function becauseBodyDoesNotMatchSchema( SchemaMismatch $prev ): self { $exception = static::fromAddrAndPrev($addr, $prev); - $exception->message = sprintf('Body does not match schema for content-type "%s" for %s', $contentType, $addr); + $exception->message = sprintf( + 'Body does not match schema for content-type "%s" for %s. [%s in %s]', + $contentType, + $addr, + substr($prev->getMessage(), 0, -1), + implode('->', $prev->dataBreadCrumb()->buildChain())); return $exception; }