Skip to content

Commit

Permalink
Error output should have lowercase attribute names (grpc-ecosystem#244)
Browse files Browse the repository at this point in the history
Adding protobuf tags to `errorBody` to get proper lowercased output when marshaled.
  • Loading branch information
nathanborror authored and yugui committed Oct 25, 2016
1 parent ff2d574 commit 50dd35e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions runtime/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ var (
)

type errorBody struct {
Error string `json:"error"`
Code int `json:"code"`
Error string `protobuf:"bytes,1,name=error" json:"error"`
Code int `protobuf:"bytes,2,name=code" json:"code"`
}

//Make this also conform to proto.Message for builtin JSONPb Marshaler
Expand Down

0 comments on commit 50dd35e

Please sign in to comment.