new StatusBuilder()
A builder for gRPC status objects.
Methods
-
build()
-
Builds the status object.
Returns:
A gRPC status.
- Type
- grpc~StatusObject
-
withCode(code)
-
Adds a status code to the builder.
Parameters:
Name Type Description code
number The status code.
Returns:
- Type
- StatusBuilder
-
withDetails(details)
-
Adds details to the builder.
Parameters:
Name Type Description details
string A status message.
Returns:
- Type
- StatusBuilder
-
withMetadata(metadata)
-
Adds metadata to the builder.
Parameters:
Name Type Description metadata
Metadata The gRPC status metadata.
Returns:
- Type
- StatusBuilder