Commit 26620c119bc08eae78a04d50e287beb2f850787b

Authored by Spencer Alan
1 parent 1788b01a
Exists in master

collapse missing and invalid credentials

app/controllers/concerns/scim_rails/exception_handler.rb
@@ -2,9 +2,6 @@ module ScimRails @@ -2,9 +2,6 @@ module ScimRails
2 module ExceptionHandler 2 module ExceptionHandler
3 extend ActiveSupport::Concern 3 extend ActiveSupport::Concern
4 4
5 - class MissingCredentials < StandardError  
6 - end  
7 -  
8 class InvalidCredentials < StandardError 5 class InvalidCredentials < StandardError
9 end 6 end
10 7
@@ -71,11 +68,10 @@ module ScimRails @@ -71,11 +68,10 @@ module ScimRails
71 68
72 ## StandardError must be ordered last or it will catch all exceptions 69 ## StandardError must be ordered last or it will catch all exceptions
73 if Rails.env.production? 70 if Rails.env.production?
74 - rescue_from StandardError do |e| 71 + rescue_from StandardError do
75 json_response( 72 json_response(
76 { 73 {
77 schemas: ["urn:ietf:params:scim:api:messages:2.0:Error"], 74 schemas: ["urn:ietf:params:scim:api:messages:2.0:Error"],
78 - detail: e.message,  
79 status: "500" 75 status: "500"
80 }, 76 },
81 :internal_server_error 77 :internal_server_error