diff --git a/Speed/Convoy.php b/Speed/Convoy.php index ebb7ad9..a215363 100644 --- a/Speed/Convoy.php +++ b/Speed/Convoy.php @@ -21,7 +21,9 @@ class Convoy extends Server ])->$method($req_url, $data); 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() ?? [];