From 3ec1df82648fde8fc92f41506f631d26df059fc3 Mon Sep 17 00:00:00 2001 From: Travis Cline Date: Mon, 7 Nov 2016 18:25:27 -0800 Subject: [PATCH] Correct protobuf field tag --- runtime/errors.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/runtime/errors.go b/runtime/errors.go index 0d3cb3bf3ca..5a51d02c0a9 100644 --- a/runtime/errors.go +++ b/runtime/errors.go @@ -64,7 +64,7 @@ var ( type errorBody struct { Error string `protobuf:"bytes,1,name=error" json:"error"` - Code int `protobuf:"bytes,2,name=code" json:"code"` + Code int32 `protobuf:"varint,2,name=code" json:"code"` } //Make this also conform to proto.Message for builtin JSONPb Marshaler @@ -85,7 +85,7 @@ func DefaultHTTPError(ctx context.Context, marshaler Marshaler, w http.ResponseW w.Header().Set("Content-Type", marshaler.ContentType()) body := &errorBody{ Error: grpc.ErrorDesc(err), - Code: int(grpc.Code(err)), + Code: int32(grpc.Code(err)), } buf, merr := marshaler.Marshal(body)