Skip to content

Commit

Permalink
Fix return error only (#99)
Browse files Browse the repository at this point in the history
* Fix-return-with-error

* fix http return only error

* Update http.go
  • Loading branch information
longquan0104 authored Mar 28, 2020
1 parent 36f99c5 commit cdfd064
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ func (g *Gateway) GraphQLHandler(w http.ResponseWriter, r *http.Request) {
// fire the query with the request context passed through to execution
result, err = g.Execute(requestContext, plan)
if err != nil {
results = append(results, formatErrorsWithCode(nil, err, "INTERNAL_SERVER_ERROR"))
results = append(results, formatErrorsWithCode(result, err, "INTERNAL_SERVER_ERROR"))

continue
}

Expand Down

0 comments on commit cdfd064

Please sign in to comment.