From 97733e57c8348d0c8301989aa63471b2a72ea7a3 Mon Sep 17 00:00:00 2001 From: Henrik Christensen Date: Mon, 4 Oct 2021 08:28:13 +0200 Subject: [PATCH] added section about Kemal.config.always_rescue (#22) --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index b8813ff..e41c8ab 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,13 @@ describe "Your::Kemal::App" do end ``` +#### Rescue errors +Errors gets rescued by default which results in the Kemal's exception page is rendered. +This may not always be the desired behaviour, e.g. when a JSON parsing error occurs one might expect `"[]"` +and not Kemal's exception page. + +Set `Kemal.config.always_rescue = false` to prevent this behaviour and raise errors instead. + ## Contributing 1. Fork it ( https://github.com/kemalcr/spec-kemal/fork )