Skip to content

Commit 5c4680d

Browse files
committed
added null check for body
Signed-off-by: Dave Shanley <[email protected]>
1 parent cfb9f3b commit 5c4680d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

responses/validate_response.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ func ValidateResponseSchema(
3737

3838
var validationErrors []*errors.ValidationError
3939

40-
if response == nil {
40+
if response == nil || response.Body == nil {
4141
// cannot decode the response body, so it's not valid
4242
violation := &errors.SchemaValidationFailure{
4343
Reason: "response is empty",

0 commit comments

Comments
 (0)