metaverse / truss

Truss helps you build go-kit microservices without having to worry about writing or maintaining boilerplate code.
Other
734 stars 143 forks source link

show actual error when jsonpb unmarshaling fails #290

Closed zaquestion closed 4 years ago

zaquestion commented 4 years ago

This didnt really matter before we started using jsonpb, since failing to part JSON was pretty straightforward to debug. Now that we use jsonpb however more complex type-aware unmarshaling occurs. For example to unmarshal into a google.protobuf.Timestamp you need to use RFC3339Nano, and messing up the format yield an unuseful error message, so useless in fact that its hard to know its actually a value you messed up and it has nothing to do with your json...