public interface ErrorMetadataOrBuilder
extends com.google.protobuf.MessageOrBuilder
| Modifier and Type | Method and Description |
|---|---|
boolean |
getHasDetails()
Indicates whether this error supports rich, typed detail messages.
|
Code |
getStatusCode()
Maps the error to a standard gRPC status code for transport-level compatibility.
|
int |
getStatusCodeValue()
Maps the error to a standard gRPC status code for transport-level compatibility.
|
findInitializationErrors, getAllFields, getDefaultInstanceForType, getDescriptorForType, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofint getStatusCodeValue()
Maps the error to a standard gRPC status code for transport-level compatibility. This field is REQUIRED for every error annotation. Use standard gRPC status codes from `google.rpc.code`. Code generators use this to: - Map errors to gRPC status codes automatically - Generate HTTP status code mappings - Create transport-agnostic error handling
.google.rpc.Code status_code = 1;Code getStatusCode()
Maps the error to a standard gRPC status code for transport-level compatibility. This field is REQUIRED for every error annotation. Use standard gRPC status codes from `google.rpc.code`. Code generators use this to: - Map errors to gRPC status codes automatically - Generate HTTP status code mappings - Create transport-agnostic error handling
.google.rpc.Code status_code = 1;boolean getHasDetails()
Indicates whether this error supports rich, typed detail messages.
Defaults to false (simple message string only).
The message type name must be derived from the enum name by convention.
Mask: {EnumValue}ErrorDetails, {EnumValue}Error, {EnumValue}
Examples:
ACCESS_DENIED -> "AccessDeniedErrorDetails", "AccessDeniedError" or "AccessDenied"
SERVER_NOT_READY -> "ServerNotReadyErrorDetails", "ServerNotReadyError" or "ServerNotReady"
Code generators use the message type name to:
- Validate that the detail message matches the expected type
- Generate type-safe error handling code
- Create accurate documentation
bool has_details = 2;