Skip to content

Commit c331fe8

Browse files
committed
Default result data to body if it cannot be decoded.
1 parent 60a224f commit c331fe8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Request/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ public function request($path, array $options = []): RequestOperationResult
442442
}
443443

444444
return new RequestOperationResult([
445-
'data' => $decoded_body,
445+
'data' => $decoded_body ?? $body,
446446
'headers' => $headers,
447447
'status_code' => $statusCode,
448448
'status_code_reason' => $response->getReasonPhrase(),

0 commit comments

Comments
 (0)