Verified Commit 8311bdb5 authored by David Beniamine's avatar David Beniamine
Browse files

Log JWT errors

parent 06d5f06d
......@@ -205,8 +205,10 @@ class JWTServer
self::authenticate($request, $user);
} catch (JWTException $e) {
Log::Warning('JWT Exception while authenticating via API: "'.$e->getMessage().'"');
return $this->fail(401, $e->getMessage());
} catch (\InvalidArgumentException $e) {
Log::Error('Error validating token while authenticating via API: "'.$e->getMessage().'"');
return $this->fail(401, 'Missing or corrupted token');
Supports Markdown
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