Skip to content

Commit

Permalink
Merge pull request #15 from vukhuu/fix-undefined-message-in-response
Browse files Browse the repository at this point in the history
Fix undefined "message" in error response as there was only "errorDescription" in the response array instead
  • Loading branch information
aaronzhongg authored Mar 27, 2024
2 parents 95cfb71 + 8dbc510 commit f3b8e61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Authsignal/AuthsignalClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public static function apiUrl($url='')
public function handleApiError($response, $status)
{
$type = $response['error'] ?? null;
$msg = $response['message'];
$msg = $response['errorDescription'] ?? null;
switch ($status) {
case 400:
throw new AuthsignalBadRequest($msg, $type, $status);
Expand Down

0 comments on commit f3b8e61

Please sign in to comment.