Closed cromega closed 1 year ago
By wading through the code I've found out about Kemal.config.always_rescue
.
@cromega would a solution to this be to just mention it in the README/documentation?
@henrikac Certainly, it is a very useful thing to mention, along with all other undocumented options.
I'm having trouble TDD-ing a Kemal app. When a runtime error happens Kemal renders the exception helper page, which gives a pretty poor testing experience:
response.body.should eq "[]"
For example, when a JSON parsing error occurs:
etc.
The functionality I'm looking for is the ability to tell Kemal to raise an error when it happens instead of rendering the error page. SInatra has a few nifty switches (eg:
raise_errors
), which are automatically enabled when RACK_ENV is "test".I couldn't find anything related in the docs of Kemal and Kemal-spec.