Commit 2d40c22727fb097261643a9ee018458609800e46
1 parent
05df052c
Exists in
master
rename json_response
Showing
2 changed files
with
5 additions
and
5 deletions
Show diff stats
app/controllers/concerns/scim_rails/exception_handler.rb
@@ -10,19 +10,19 @@ module ScimRails | @@ -10,19 +10,19 @@ module ScimRails | ||
10 | 10 | ||
11 | included do | 11 | included do |
12 | rescue_from ScimRails::ExceptionHandler::InvalidCredentials do | 12 | rescue_from ScimRails::ExceptionHandler::InvalidCredentials do |
13 | - scim_response({ message: "Invalid credentials" }, :unauthorized) | 13 | + json_response({ message: "Invalid credentials" }, :unauthorized) |
14 | end | 14 | end |
15 | 15 | ||
16 | rescue_from ScimRails::ExceptionHandler::MissingCredentials do | 16 | rescue_from ScimRails::ExceptionHandler::MissingCredentials do |
17 | - scim_response({ message: "Missing credentials" }, :unauthorized) | 17 | + json_response({ message: "Missing credentials" }, :unauthorized) |
18 | end | 18 | end |
19 | 19 | ||
20 | rescue_from ActiveRecord::RecordNotFound do |e| | 20 | rescue_from ActiveRecord::RecordNotFound do |e| |
21 | - scim_response({ message: e.message }, :not_found) | 21 | + json_response({ message: e.message }, :not_found) |
22 | end | 22 | end |
23 | 23 | ||
24 | rescue_from ActiveRecord::RecordInvalid do |e| | 24 | rescue_from ActiveRecord::RecordInvalid do |e| |
25 | - scim_response({ message: e.message }, :unprocessable_entity) | 25 | + json_response({ message: e.message }, :unprocessable_entity) |
26 | end | 26 | end |
27 | end | 27 | end |
28 | end | 28 | end |
app/controllers/concerns/scim_rails/response.rb