From 17fd3c60f8f47370e2f5a4657d77c66dcbcbb900 Mon Sep 17 00:00:00 2001 From: Gisle Aune Date: Sat, 5 Jan 2019 10:09:31 +0100 Subject: [PATCH] rpdata-server: Fixed unhelpful error message being returned on panic. --- cmd/rpdata-server/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/rpdata-server/main.go b/cmd/rpdata-server/main.go index 23a8d2a..b909717 100644 --- a/cmd/rpdata-server/main.go +++ b/cmd/rpdata-server/main.go @@ -75,11 +75,10 @@ func queryHandler() http.HandlerFunc { handler := handler.GraphQL( graph2.New(), handler.RecoverFunc(func(ctx context.Context, err interface{}) error { - // send this panic somewhere log.Println(err) log.Println(string(debug.Stack())) - return fmt.Errorf("shit") + return fmt.Errorf("The server failed to serve your request due to an internal error, it has been logged") }), )