Commit 05f9e65b34d818786127b660f79619587c285c5d
1 parent
1767ffa5
Exists in
master
fix: add more details to exception handler
Showing
2 changed files
with
4 additions
and
2 deletions
Show diff stats
app/controllers/concerns/scim_rails/exception_handler.rb
@@ -18,12 +18,14 @@ module ScimRails | @@ -18,12 +18,14 @@ module ScimRails | ||
18 | if on_error.respond_to?(:call) | 18 | if on_error.respond_to?(:call) |
19 | on_error.call(exception) | 19 | on_error.call(exception) |
20 | else | 20 | else |
21 | - Rails.logger.error(exception.inspect) | 21 | + Rails.logger.error(exception.message) |
22 | + Rails.logger.error(exception.backtrace.join("\n")) | ||
22 | end | 23 | end |
23 | 24 | ||
24 | json_response( | 25 | json_response( |
25 | { | 26 | { |
26 | schemas: ["urn:ietf:params:scim:api:messages:2.0:Error"], | 27 | schemas: ["urn:ietf:params:scim:api:messages:2.0:Error"], |
28 | + details: exception.message, | ||
27 | status: "500" | 29 | status: "500" |
28 | }, | 30 | }, |
29 | :internal_server_error | 31 | :internal_server_error |
lib/scim_rails/version.rb