A user makes a request to the API and includes their Authorization header. The token contained therein was encoded with the Panoptes staging key, and the first attempt to verify it (via the :authenticated_admin? method in the PanoptesApi service) causes the jwt gem to raise a JWT::VerificationError.
Currently this causes a 500 and a report to Sentry. This error, or maybe a more comprehensive group of potential JWT:: errors, should be caught and serialized back.
A user makes a request to the API and includes their
Authorizationheader. The token contained therein was encoded with the Panoptes staging key, and the first attempt to verify it (via the:authenticated_admin?method in the PanoptesApi service) causes the jwt gem to raise aJWT::VerificationError.Currently this causes a 500 and a report to Sentry. This error, or maybe a more comprehensive group of potential
JWT::errors, should be caught and serialized back.