From 325208343e91ce88e0fdb8f7e9925b4aa01b4ef2 Mon Sep 17 00:00:00 2001 From: Pedro Belo Date: Wed, 16 Sep 2015 14:32:20 -0700 Subject: [PATCH] automatically turn NoMatchingRow exceptions in a 404 --- lib/template/lib/endpoints/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/template/lib/endpoints/base.rb b/lib/template/lib/endpoints/base.rb index a7699e81..c4e71b9e 100644 --- a/lib/template/lib/endpoints/base.rb +++ b/lib/template/lib/endpoints/base.rb @@ -17,7 +17,7 @@ class Base < Sinatra::Base also_reload '../**/*.rb' end - error Sinatra::NotFound do + error Sinatra::NotFound, Sequel::NoMatchingRow do raise Pliny::Errors::NotFound end end