From 2d2b862f3e9e1b70851b1169ca44c5156d445afd Mon Sep 17 00:00:00 2001 From: Cedric Wider Date: Mon, 12 May 2014 21:08:05 +0200 Subject: [PATCH] verbose logging when url is rejected for api calls --- routes/api_controller.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/routes/api_controller.rb b/routes/api_controller.rb index 7c13f14..5d152cb 100644 --- a/routes/api_controller.rb +++ b/routes/api_controller.rb @@ -1,7 +1,10 @@ class Penelope < Sinatra::Application before '/api/*' do - halt 404 unless request.path_info =~ /^\/api\/(user)(\/\w+)?$/ + unless request.path_info =~ /^\/api\/(user)(\/\w+)?$/ + puts "path #{request.path_info} doesn't match /api/user" + halt 404 + end end get '/api/:thing' do