fromHttpStatus static method
What a caller reports for a response with HTTP status httpStatus
other than 200: the status grpcStatusFromHttpStatus gives it, and the
message HTTP <status> followed by detail when given.
Implementation
static RpcMetadata fromHttpStatus(
int httpStatus, {
String? detail,
int? maxMessageLength,
}) => status(
grpcStatusFromHttpStatus(httpStatus),
message: detail == null ? 'HTTP $httpStatus' : 'HTTP $httpStatus $detail',
maxMessageLength: maxMessageLength,
);