更新 Speed/Convoy.php
This commit is contained in:
parent
4f1a471ac5
commit
5ec978f4cb
@ -21,7 +21,9 @@ class Convoy extends Server
|
|||||||
])->$method($req_url, $data);
|
])->$method($req_url, $data);
|
||||||
|
|
||||||
if (!$response->successful()) {
|
if (!$response->successful()) {
|
||||||
throw new Exception($response->json()['message']);
|
$json = $response->json();
|
||||||
|
$message = $json['message'] ?? $json['error'] ?? 'Server Error';
|
||||||
|
throw new Exception($message);
|
||||||
}
|
}
|
||||||
|
|
||||||
return $response->json() ?? [];
|
return $response->json() ?? [];
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user