Skip to content

Commit

Permalink
Merge pull request #69 from tonypartridge/main
Browse files Browse the repository at this point in the history
Fix ErrorExceptions
  • Loading branch information
dcblogdev authored Jul 25, 2024
2 parents 5d99c9e + 9b93ae9 commit 4d62450
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Xero.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ protected function guzzle(string $type, string $request, array $data = [], bool
];
} catch (RequestException $e) {
$response = json_decode($e->response->body());
throw new Exception($response->Detail ?? "Type: $response->Type Message: $response->Message Error Number: $response->ErrorNumber");
throw new Exception($response->Detail ?? "Type: $response?->Type Message: $response?->Message Error Number: $response?->ErrorNumber");
} catch (Exception $e) {
throw new Exception($e->getMessage());
}
Expand Down

0 comments on commit 4d62450

Please sign in to comment.