Skip to content

Commit

Permalink
Change hardcoded fallback error to match new syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Calebjh committed Jan 8, 2019
1 parent 57fe82a commit 62e6914
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gateway/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (h *ProtoErrorHandler) StreamHandler(ctx context.Context, headerWritten boo
}

func (h *ProtoErrorHandler) writeError(ctx context.Context, headerWritten bool, marshaler runtime.Marshaler, rw http.ResponseWriter, err error) {
const fallback = `{"code":"INTERNAL","status":500,"message":"%s"}`
const fallback = `{"error":[{"message":"%s"}]}`

st, ok := status.FromError(err)
if !ok {
Expand Down

0 comments on commit 62e6914

Please sign in to comment.