diff --git a/src/endpoints/Auth.php b/src/endpoints/Auth.php index 024d281d4d..af97e1279d 100644 --- a/src/endpoints/Auth.php +++ b/src/endpoints/Auth.php @@ -230,7 +230,7 @@ public function ssoServiceCallback(Request $request, Response $response) $urlParams['attributes'] = $e->getAttributes(); } - $urlParams['code'] = $e->getErrorCode(); + $urlParams['code'] = ($e instanceof \Directus\Exception\Exception) ? $e->getErrorCode() : 0; $urlParams['error'] = true; }