-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ability to supply a callable error handler
resolves #23 Why? The scim engine returns a custom response to the caller in the event that there is a 500 error in the engine. It rescues any standard error in order to do this. Unfortunately this means that when something is broken it does not bubble up to the parent app's error handling system or even be printed in the logs. We cannot just re-raise the exception because you cannot return a response AND raise an exception as a part of the same request. To help, this PR will make is possible for you to supply a callable object that take the exception as it's argument. If no callable object is provided, we will output the exception to the logs so that silence is not the default. To get the old behavior of completely ignoring an exception, you could supply an empty proc.
- Loading branch information
1 parent
b6f156e
commit 7ba7da5
Showing
6 changed files
with
39 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ spec/dummy/db/*.sqlite3 | |
spec/dummy/db/*.sqlite3-journal | ||
spec/dummy/log/*.log | ||
spec/dummy/tmp/ | ||
.rubocop-https* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
inherit_from: | ||
- https://raw.githubusercontent.com/lessonly/rubocop-default-configuration/master/.rubocop.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Upcoming Release | ||
|
||
- Any unhandled error is now logged to the configured rails logger by default. You can also now supply a custom callable that will be used to handle those exceptions instead. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters