use super::*;
define_error_catalog! {
RPC_BROKER_ADDRESS_NOT_FOUND {
code: "rpc.broker_address.not_found",
class: ErrorClass::ROUTING,
condition: CanonicalCondition::NotFound,
fault: FaultAttribution::Dependency,
component: ComponentId::CLIENT,
public_message: "RPC broker address was not found",
severity: ErrorSeverity::Error,
recovery_hint: RecoveryHint::Backoff,
backtrace: BacktracePolicy::Never,
exposure: Exposure::Generic,
fields: [fields::BROKER],
projection: {
remoting: RemotingResponseCode::SystemError,
grpc: {
payload: GrpcPayloadCode::NotFound,
status: GrpcStatusCode::NotFound,
},
http: HttpStatusCode::NOT_FOUND,
cli: CliExitCode::NOT_FOUND,
},
}
RPC_REQUEST_UNSUPPORTED {
code: "rpc.request.unsupported",
class: ErrorClass::UNSUPPORTED,
condition: CanonicalCondition::Unimplemented,
fault: FaultAttribution::Caller,
component: ComponentId::CLIENT,
public_message: "RPC request is unsupported",
severity: ErrorSeverity::Error,
recovery_hint: RecoveryHint::Never,
backtrace: BacktracePolicy::Never,
exposure: Exposure::Generic,
fields: [fields::REQUEST_CODE],
projection: {
remoting: RemotingResponseCode::SystemError,
grpc: {
payload: GrpcPayloadCode::Unsupported,
status: GrpcStatusCode::Unimplemented,
},
http: HttpStatusCode::BAD_REQUEST,
cli: CliExitCode::USAGE,
},
}
RPC_REQUEST_FAILED {
code: "rpc.request.failed",
class: ErrorClass::UNAVAILABLE,
condition: CanonicalCondition::Unavailable,
fault: FaultAttribution::Dependency,
component: ComponentId::CLIENT,
public_message: "RPC request failed",
severity: ErrorSeverity::Error,
recovery_hint: RecoveryHint::Backoff,
backtrace: BacktracePolicy::Never,
exposure: Exposure::Generic,
fields: [
fields::REMOTE_ADDR,
fields::REQUEST_CODE,
fields::TIMEOUT_MS,
fields::SOURCE_PRESENT,
],
projection: {
remoting: RemotingResponseCode::SystemError,
grpc: {
payload: GrpcPayloadCode::InternalError,
status: GrpcStatusCode::Unavailable,
},
http: HttpStatusCode::SERVICE_UNAVAILABLE,
cli: CliExitCode::UNAVAILABLE,
},
}
RPC_RESPONSE_FAILED {
code: "rpc.response.failed",
class: ErrorClass::INTERNAL,
condition: CanonicalCondition::Internal,
fault: FaultAttribution::RemotePeer,
component: ComponentId::CLIENT,
public_message: "RPC response failed",
severity: ErrorSeverity::Error,
recovery_hint: RecoveryHint::Backoff,
backtrace: BacktracePolicy::Never,
exposure: Exposure::Generic,
fields: [fields::REMOTE_CODE, fields::MESSAGE_PRESENT],
projection: {
remoting: RemotingResponseCode::SystemError,
grpc: {
payload: GrpcPayloadCode::InternalError,
status: GrpcStatusCode::Internal,
},
http: HttpStatusCode::INTERNAL_SERVER_ERROR,
cli: CliExitCode::SOFTWARE,
},
}
}