rpdata-server: Fixed unhelpful error message being returned on panic.
the build was successful

This commit is contained in:
2019-01-05 10:09:31 +01:00
parent c5b62a42db
commit 17fd3c60f8
+1 -2
View File
@@ -75,11 +75,10 @@ func queryHandler() http.HandlerFunc {
handler := handler.GraphQL( handler := handler.GraphQL(
graph2.New(), graph2.New(),
handler.RecoverFunc(func(ctx context.Context, err interface{}) error { handler.RecoverFunc(func(ctx context.Context, err interface{}) error {
// send this panic somewhere
log.Println(err) log.Println(err)
log.Println(string(debug.Stack())) 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")
}), }),
) )