of static method

RpcMetadata of(
  1. RpcStatusException error, {
  2. int? maxMessageLength,
})

The trailer carrying error's status, message and details.

For an error this side raised itself. One a handler threw goes through wireStatusFor first.

Implementation

static RpcMetadata of(RpcStatusException error, {int? maxMessageLength}) =>
    status(
      error.statusCode,
      message: error.message,
      statusDetailsBin: error.statusDetailsBin,
      maxMessageLength: maxMessageLength,
    );