Skip to content
Snippets Groups Projects
Commit 5cfd213c authored by Hajo Seng's avatar Hajo Seng Committed by Robert Lange
Browse files

Correction of wrong parameter types in exception handling (#1915)

parent 2dba7fa9
Branches
Tags
No related merge requests found
...@@ -954,7 +954,7 @@ class PAIA extends DAIA ...@@ -954,7 +954,7 @@ class PAIA extends DAIA
case 'access_denied': case 'access_denied':
throw new AuthException( throw new AuthException(
$array['error_description'] ?? $array['error'], $array['error_description'] ?? $array['error'],
$array['code'] ?? '' (int)($array['code'] ?? 0)
); );
// invalid_grant 401 The access token was missing, invalid // invalid_grant 401 The access token was missing, invalid
...@@ -966,7 +966,7 @@ class PAIA extends DAIA ...@@ -966,7 +966,7 @@ class PAIA extends DAIA
case 'insufficient_scope': case 'insufficient_scope':
throw new ForbiddenException( throw new ForbiddenException(
$array['error_description'] ?? $array['error'], $array['error_description'] ?? $array['error'],
$array['code'] ?? '' (int)($array['code'] ?? 0)
); );
// not_found 404 Unknown request URL or unknown patron. // not_found 404 Unknown request URL or unknown patron.
...@@ -1013,7 +1013,7 @@ class PAIA extends DAIA ...@@ -1013,7 +1013,7 @@ class PAIA extends DAIA
default: default:
throw new ILSException( throw new ILSException(
$array['error_description'] ?? $array['error'], $array['error_description'] ?? $array['error'],
$array['code'] ?? '' (int)($array['code'] ?? 0)
); );
} }
} }
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment