diff --git a/app/controllers/api/openid_connect/token_endpoint_controller.rb b/app/controllers/api/openid_connect/token_endpoint_controller.rb
index c8ebf5b640e56d8b1342adf6967fd21e411859cb..9f145058d278cc6ef6b335f476af8a82ab1eee31 100644
--- a/app/controllers/api/openid_connect/token_endpoint_controller.rb
+++ b/app/controllers/api/openid_connect/token_endpoint_controller.rb
@@ -46,16 +46,16 @@ module Api
         end
       end
 
-      rescue_from Rack::OAuth2::Server::Authorize::BadRequest, JSON::JWT::InvalidFormat do |e|
+      rescue_from Rack::OAuth2::Server::Authorize::BadRequest,
+                  JSON::JWT::InvalidFormat, JSON::JWK::UnknownAlgorithm do |e|
         logger.info e.backtrace[0, 10].join("\n")
-        render json: {error: :invalid_request, error_description: e.message, status: e.status}
-      end
-      rescue_from JSON::JWT::InvalidFormat do |e|
         render json: {error: :invalid_request, error_description: e.message, status: 400}
       end
       rescue_from JSON::JWT::VerificationFailed do |e|
+        logger.info e.backtrace[0, 10].join("\n")
         render json: {error: :invalid_grant, error_description: e.message, status: 400}
       end
+
     end
   end
 end