Skip to content

Decode error metadata into some readable format #389

@alexander-fenster

Description

@alexander-fenster

Right now, the error details from the service are hidden in the error metadata and I'm pretty sure users never see them (let alone decoding them). We need to present them in some readable form.

Example of the current metadata content as returned by err.metadata.getMap():

{
  'google.rpc.badrequest-bin': <Buffer 0a 3c 0a 10 64 6f 63 75 6d 65 6e 74 2e 63 6f 6e 74 65 6e 74 12 28 4d 75 73 74 20 68 61 76 65 20 73 6f 6d 65 20 74 65 78 74 20 63 6f 6e 74 65 6e 74 20 ... 12 more bytes>,
  'grpc-status-details-bin': <Buffer 08 03 12 2f 4f 6e 65 20 6f 66 20 63 6f 6e 74 65 6e 74 2c 20 6f 72 20 67 63 73 5f 63 6f 6e 74 65 6e 74 5f 75 72 69 20 6d 75 73 74 20 62 65 20 73 65 74 ... 110 more bytes>
}

Metadata

Metadata

Assignees

Labels

type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions