Skip to content

Commit 727262e

Browse files
committed
Edit Response NULL Error
1 parent dfe1d84 commit 727262e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/Request/GuzzleAdapter.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ public static function RequestHandleException($exception)
6868
], 408, 'failed');
6969
} else {
7070
$error = json_decode($exception->getResponse()->getBody()->getContents(), true);
71+
if (empty($error['error'])) {
72+
$error['message'] = 'Request Failed';
73+
}
7174
return ResponseFormatter::formatResponse([
7275
'error' => $error['message']
7376
], 400, 'failed');

0 commit comments

Comments
 (0)