Skip to content

v1.6.0

Compare
Choose a tag to compare
@jhump jhump released this 15 May 12:25
· 116 commits to master since this release
2108c8f

Changes

Command-line tool

  • Fixes a bug when using -format text where the program would crash when formatting an empty reponse message.
  • Adds -use-reflection command-line flag. Previously this was true if and only if no -proto or-protoset option were used. This is still the default behavior. But now it can be used with a -proto or -protoset option to use server reflection to resolve the RPC services and schemas but to also provide proto sources to supply message types and extenions that the server may not know about. This can also be used to resolve google.protobuf.Any messages in the response or in RPC error details.
  • Adds -format-error flag which will cause an RPC error to be formatted in a machine-consumable form instead of a human-consumable form. The error will be a google.rpc.Status message representing the error, formatted to stderr as JSON or text, based on the -format in use.
  • The exit code of grpcurl now indicates the gRPC code of any RPC failure that occurs. The exit code will be 64 plus the numeric value of the error code; so if the RPC fails with an INVALID_ARGUMENT error (code 3), the process will exit with a status of 67. Lower exit codes indicate an error that prevented the RPC from being issued: a code of 2 means a usage error, such as invalid combination of command-line options; a code of 1 indicates some other error occurred, such as being unable to open files or dial a server.