mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Add description to exception
This commit is contained in:
@@ -16,8 +16,8 @@ class Exception extends AppwriteException
|
||||
$this->message = $response;
|
||||
$decoded = json_decode($response, true);
|
||||
if (\is_array($decoded)) {
|
||||
$this->error = $decoded['error'];
|
||||
$this->errorDescription = $decoded['error_description'];
|
||||
$this->error = $decoded['error'] ?? $decoded['message'] ?? "Unknown error";
|
||||
$this->errorDescription = $decoded['error_description'] ?? "No description";
|
||||
$this->message = $this->error . ': ' . $this->errorDescription;
|
||||
}
|
||||
$type = match ($code) {
|
||||
|
||||
Reference in New Issue
Block a user