From fd240b2fc7531a059e3a315400ffd2df76a5db85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alberto=20Miedes=20Garc=C3=A9s?= Date: Fri, 27 Jan 2017 14:46:26 +0100 Subject: [PATCH] Rescue all exceptions in production --- app/controllers/graphql_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/graphql_controller.rb b/app/controllers/graphql_controller.rb index ea1decdb5..ba8edc2b4 100644 --- a/app/controllers/graphql_controller.rb +++ b/app/controllers/graphql_controller.rb @@ -14,6 +14,8 @@ class GraphqlController < ApplicationController render json: { message: 'Query string not present' }, status: :bad_request rescue GraphQL::ParseError render json: { message: 'Query string is not valid JSON' }, status: :bad_request + rescue + unless Rails.env.production? then raise end end end