Skip to main content

rocketmq_error/catalog/
proxy.rs

1// Copyright 2026 The RocketMQ Rust Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//     http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15use super::*;
16
17define_error_catalog! {
18    /// A Broker denied an operation issued through the Proxy.
19    PROXY_BROKER_PERMISSION_DENIED {
20        code: "proxy.broker_response.permission_denied",
21        class: ErrorClass::AUTHORIZATION,
22        condition: CanonicalCondition::PermissionDenied,
23        fault: FaultAttribution::RemotePeer,
24        component: ComponentId::PROXY,
25        public_message: "Broker denied the Proxy operation",
26        severity: ErrorSeverity::Warn,
27        recovery_hint: RecoveryHint::Never,
28        backtrace: BacktracePolicy::Never,
29        exposure: Exposure::Generic,
30        fields: [
31            fields::OPERATION_DIAGNOSTIC,
32            fields::BROKER_CODE,
33            fields::BROKER_ADDR,
34            fields::MESSAGE_PRESENT,
35            fields::SOURCE_PRESENT,
36        ],
37        projection: {
38            remoting: RemotingResponseCode::SystemError,
39            grpc: {
40                payload: GrpcPayloadCode::Forbidden,
41                status: GrpcStatusCode::PermissionDenied,
42            },
43            http: HttpStatusCode::FORBIDDEN,
44            cli: CliExitCode::PERMISSION,
45        },
46    }
47    /// A Broker reported that a topic requested through the Proxy was absent.
48    PROXY_BROKER_TOPIC_NOT_FOUND {
49        code: "proxy.broker_response.topic_not_found",
50        class: ErrorClass::ROUTING,
51        condition: CanonicalCondition::NotFound,
52        fault: FaultAttribution::RemotePeer,
53        component: ComponentId::PROXY,
54        public_message: "Broker topic was not found",
55        severity: ErrorSeverity::Warn,
56        recovery_hint: RecoveryHint::Never,
57        backtrace: BacktracePolicy::Never,
58        exposure: Exposure::Generic,
59        fields: [
60            fields::OPERATION_DIAGNOSTIC,
61            fields::BROKER_CODE,
62            fields::BROKER_ADDR,
63            fields::MESSAGE_PRESENT,
64            fields::SOURCE_PRESENT,
65        ],
66        projection: {
67            remoting: RemotingResponseCode::SystemError,
68            grpc: {
69                payload: GrpcPayloadCode::TopicNotFound,
70                status: GrpcStatusCode::NotFound,
71            },
72            http: HttpStatusCode::NOT_FOUND,
73            cli: CliExitCode::NOT_FOUND,
74        },
75    }
76    /// A Broker reported that a consumer group requested through the Proxy was absent.
77    PROXY_BROKER_CONSUMER_GROUP_NOT_FOUND {
78        code: "proxy.broker_response.consumer_group_not_found",
79        class: ErrorClass::ROUTING,
80        condition: CanonicalCondition::NotFound,
81        fault: FaultAttribution::RemotePeer,
82        component: ComponentId::PROXY,
83        public_message: "Broker consumer group was not found",
84        severity: ErrorSeverity::Warn,
85        recovery_hint: RecoveryHint::Never,
86        backtrace: BacktracePolicy::Never,
87        exposure: Exposure::Generic,
88        fields: [
89            fields::OPERATION_DIAGNOSTIC,
90            fields::BROKER_CODE,
91            fields::BROKER_ADDR,
92            fields::MESSAGE_PRESENT,
93            fields::SOURCE_PRESENT,
94        ],
95        projection: {
96            remoting: RemotingResponseCode::SystemError,
97            grpc: {
98                payload: GrpcPayloadCode::ConsumerGroupNotFound,
99                status: GrpcStatusCode::NotFound,
100            },
101            http: HttpStatusCode::NOT_FOUND,
102            cli: CliExitCode::NOT_FOUND,
103        },
104    }
105    /// A Broker reported that a generic resource requested through the Proxy was absent.
106    PROXY_BROKER_RESOURCE_NOT_FOUND {
107        code: "proxy.broker_response.resource_not_found",
108        class: ErrorClass::ROUTING,
109        condition: CanonicalCondition::NotFound,
110        fault: FaultAttribution::RemotePeer,
111        component: ComponentId::PROXY,
112        public_message: "Broker resource was not found",
113        severity: ErrorSeverity::Warn,
114        recovery_hint: RecoveryHint::Never,
115        backtrace: BacktracePolicy::Never,
116        exposure: Exposure::Generic,
117        fields: [
118            fields::OPERATION_DIAGNOSTIC,
119            fields::BROKER_CODE,
120            fields::BROKER_ADDR,
121            fields::MESSAGE_PRESENT,
122            fields::SOURCE_PRESENT,
123        ],
124        projection: {
125            remoting: RemotingResponseCode::SystemError,
126            grpc: {
127                payload: GrpcPayloadCode::NotFound,
128                status: GrpcStatusCode::NotFound,
129            },
130            http: HttpStatusCode::NOT_FOUND,
131            cli: CliExitCode::NOT_FOUND,
132        },
133    }
134    /// A Broker reported that an offset requested through the Proxy was absent.
135    PROXY_BROKER_OFFSET_NOT_FOUND {
136        code: "proxy.broker_response.offset_not_found",
137        class: ErrorClass::ROUTING,
138        condition: CanonicalCondition::NotFound,
139        fault: FaultAttribution::RemotePeer,
140        component: ComponentId::PROXY,
141        public_message: "Broker offset was not found",
142        severity: ErrorSeverity::Warn,
143        recovery_hint: RecoveryHint::Never,
144        backtrace: BacktracePolicy::Never,
145        exposure: Exposure::Generic,
146        fields: [
147            fields::OPERATION_DIAGNOSTIC,
148            fields::BROKER_CODE,
149            fields::BROKER_ADDR,
150            fields::MESSAGE_PRESENT,
151            fields::SOURCE_PRESENT,
152        ],
153        projection: {
154            remoting: RemotingResponseCode::SystemError,
155            grpc: {
156                payload: GrpcPayloadCode::OffsetNotFound,
157                status: GrpcStatusCode::NotFound,
158            },
159            http: HttpStatusCode::NOT_FOUND,
160            cli: CliExitCode::NOT_FOUND,
161        },
162    }
163    /// A Broker rejected an invalid offset supplied through the Proxy.
164    PROXY_BROKER_OFFSET_INVALID {
165        code: "proxy.broker_response.offset_invalid",
166        class: ErrorClass::VALIDATION,
167        condition: CanonicalCondition::InvalidArgument,
168        fault: FaultAttribution::Caller,
169        component: ComponentId::PROXY,
170        public_message: "Broker rejected an invalid offset",
171        severity: ErrorSeverity::Info,
172        recovery_hint: RecoveryHint::Never,
173        backtrace: BacktracePolicy::Never,
174        exposure: Exposure::Generic,
175        fields: [
176            fields::OPERATION_DIAGNOSTIC,
177            fields::BROKER_CODE,
178            fields::BROKER_ADDR,
179            fields::MESSAGE_PRESENT,
180            fields::SOURCE_PRESENT,
181        ],
182        projection: {
183            remoting: RemotingResponseCode::SystemError,
184            grpc: {
185                payload: GrpcPayloadCode::IllegalOffset,
186                status: GrpcStatusCode::InvalidArgument,
187            },
188            http: HttpStatusCode::BAD_REQUEST,
189            cli: CliExitCode::USAGE,
190        },
191    }
192    /// A Broker does not implement a request issued through the Proxy.
193    PROXY_BROKER_REQUEST_UNSUPPORTED {
194        code: "proxy.broker_response.request_unsupported",
195        class: ErrorClass::UNSUPPORTED,
196        condition: CanonicalCondition::Unimplemented,
197        fault: FaultAttribution::Dependency,
198        component: ComponentId::PROXY,
199        public_message: "Broker does not support the Proxy request",
200        severity: ErrorSeverity::Error,
201        recovery_hint: RecoveryHint::Never,
202        backtrace: BacktracePolicy::Never,
203        exposure: Exposure::Generic,
204        fields: [
205            fields::OPERATION_DIAGNOSTIC,
206            fields::BROKER_CODE,
207            fields::BROKER_ADDR,
208            fields::MESSAGE_PRESENT,
209            fields::SOURCE_PRESENT,
210        ],
211        projection: {
212            remoting: RemotingResponseCode::SystemError,
213            grpc: {
214                payload: GrpcPayloadCode::Unsupported,
215                status: GrpcStatusCode::Unimplemented,
216            },
217            http: HttpStatusCode::NOT_IMPLEMENTED,
218            cli: CliExitCode::SOFTWARE,
219        },
220    }
221    /// A Broker returned a failure that has no more specific Proxy classification.
222    PROXY_BROKER_RESPONSE_FAILED {
223        code: "proxy.broker_response.failed",
224        class: ErrorClass::INTERNAL,
225        condition: CanonicalCondition::Internal,
226        fault: FaultAttribution::RemotePeer,
227        component: ComponentId::PROXY,
228        public_message: "Broker response failed",
229        severity: ErrorSeverity::Error,
230        recovery_hint: RecoveryHint::SwitchBroker,
231        backtrace: BacktracePolicy::Never,
232        exposure: Exposure::Generic,
233        fields: [
234            fields::OPERATION_DIAGNOSTIC,
235            fields::BROKER_CODE,
236            fields::BROKER_ADDR,
237            fields::MESSAGE_PRESENT,
238            fields::SOURCE_PRESENT,
239        ],
240        projection: {
241            remoting: RemotingResponseCode::SystemError,
242            grpc: {
243                payload: GrpcPayloadCode::InternalError,
244                status: GrpcStatusCode::Internal,
245            },
246            http: HttpStatusCode::INTERNAL_SERVER_ERROR,
247            cli: CliExitCode::SOFTWARE,
248        },
249    }
250    /// A Proxy gRPC request omitted its required client identifier.
251    PROXY_CLIENT_ID_REQUIRED {
252        code: "proxy.client.id.required",
253        class: ErrorClass::VALIDATION,
254        condition: CanonicalCondition::InvalidArgument,
255        fault: FaultAttribution::Caller,
256        component: ComponentId::PROXY,
257        public_message: "gRPC client id is required",
258        severity: ErrorSeverity::Info,
259        recovery_hint: RecoveryHint::Never,
260        backtrace: BacktracePolicy::Never,
261        exposure: Exposure::Generic,
262        fields: [],
263        projection: {
264            remoting: RemotingResponseCode::SystemError,
265            grpc: {
266                payload: GrpcPayloadCode::ClientIdRequired,
267                status: GrpcStatusCode::InvalidArgument,
268            },
269            http: HttpStatusCode::BAD_REQUEST,
270            cli: CliExitCode::USAGE,
271        },
272    }
273    /// A Proxy gRPC request declared an unrecognized client type.
274    PROXY_CLIENT_TYPE_UNRECOGNIZED {
275        code: "proxy.client.type.unrecognized",
276        class: ErrorClass::VALIDATION,
277        condition: CanonicalCondition::InvalidArgument,
278        fault: FaultAttribution::Caller,
279        component: ComponentId::PROXY,
280        public_message: "Proxy client type is not recognized",
281        severity: ErrorSeverity::Info,
282        recovery_hint: RecoveryHint::Never,
283        backtrace: BacktracePolicy::Never,
284        exposure: Exposure::Generic,
285        fields: [],
286        projection: {
287            remoting: RemotingResponseCode::SystemError,
288            grpc: {
289                payload: GrpcPayloadCode::UnrecognizedClientType,
290                status: GrpcStatusCode::InvalidArgument,
291            },
292            http: HttpStatusCode::BAD_REQUEST,
293            cli: CliExitCode::USAGE,
294        },
295    }
296    /// A requested Proxy capability is not implemented.
297    PROXY_CAPABILITY_UNSUPPORTED {
298        code: "proxy.capability.unsupported",
299        class: ErrorClass::UNSUPPORTED,
300        condition: CanonicalCondition::Unimplemented,
301        fault: FaultAttribution::Configuration,
302        component: ComponentId::PROXY,
303        public_message: "Proxy capability is not implemented",
304        severity: ErrorSeverity::Error,
305        recovery_hint: RecoveryHint::Never,
306        backtrace: BacktracePolicy::Never,
307        exposure: Exposure::Generic,
308        fields: [fields::OPERATION_DIAGNOSTIC],
309        projection: {
310            remoting: RemotingResponseCode::RequestCodeNotSupported,
311            grpc: {
312                payload: GrpcPayloadCode::NotImplemented,
313                status: GrpcStatusCode::Unimplemented,
314            },
315            http: HttpStatusCode::NOT_IMPLEMENTED,
316            cli: CliExitCode::SOFTWARE,
317        },
318    }
319    /// A Proxy-local capacity limit rejected a request.
320    PROXY_CAPACITY_EXHAUSTED {
321        code: "proxy.capacity.exhausted",
322        class: ErrorClass::CAPACITY,
323        condition: CanonicalCondition::ResourceExhausted,
324        fault: FaultAttribution::LocalResource,
325        component: ComponentId::PROXY,
326        public_message: "Proxy capacity is exhausted",
327        severity: ErrorSeverity::Warn,
328        recovery_hint: RecoveryHint::Backoff,
329        backtrace: BacktracePolicy::Never,
330        exposure: Exposure::Generic,
331        fields: [fields::OPERATION_DIAGNOSTIC],
332        projection: {
333            remoting: RemotingResponseCode::SystemBusy,
334            grpc: {
335                payload: GrpcPayloadCode::TooManyRequests,
336                status: GrpcStatusCode::ResourceExhausted,
337            },
338            http: HttpStatusCode::TOO_MANY_REQUESTS,
339            cli: CliExitCode::TEMPORARY_FAILURE,
340        },
341    }
342    /// A draining Proxy rejected a new request.
343    PROXY_REQUEST_DRAINING {
344        code: "proxy.request.draining",
345        class: ErrorClass::UNAVAILABLE,
346        condition: CanonicalCondition::Unavailable,
347        fault: FaultAttribution::LocalResource,
348        component: ComponentId::PROXY,
349        public_message: "Proxy is draining and does not accept new requests",
350        severity: ErrorSeverity::Warn,
351        recovery_hint: RecoveryHint::Backoff,
352        backtrace: BacktracePolicy::Never,
353        exposure: Exposure::Generic,
354        fields: [],
355        projection: {
356            remoting: RemotingResponseCode::SystemError,
357            grpc: {
358                payload: GrpcPayloadCode::InternalError,
359                status: GrpcStatusCode::Unavailable,
360            },
361            http: HttpStatusCode::SERVICE_UNAVAILABLE,
362            cli: CliExitCode::UNAVAILABLE,
363        },
364    }
365    /// A Proxy gRPC request supplied invalid metadata.
366    PROXY_METADATA_INVALID {
367        code: "proxy.metadata.invalid",
368        class: ErrorClass::VALIDATION,
369        condition: CanonicalCondition::InvalidArgument,
370        fault: FaultAttribution::Caller,
371        component: ComponentId::PROXY,
372        public_message: "gRPC metadata is invalid",
373        severity: ErrorSeverity::Info,
374        recovery_hint: RecoveryHint::Never,
375        backtrace: BacktracePolicy::Never,
376        exposure: Exposure::Generic,
377        fields: [fields::MESSAGE_PRESENT],
378        projection: {
379            remoting: RemotingResponseCode::SystemError,
380            grpc: {
381                payload: GrpcPayloadCode::BadRequest,
382                status: GrpcStatusCode::InvalidArgument,
383            },
384            http: HttpStatusCode::BAD_REQUEST,
385            cli: CliExitCode::USAGE,
386        },
387    }
388    /// A Proxy transport dependency is unavailable.
389    PROXY_TRANSPORT_UNAVAILABLE {
390        code: "proxy.transport.unavailable",
391        class: ErrorClass::UNAVAILABLE,
392        condition: CanonicalCondition::Unavailable,
393        fault: FaultAttribution::Unknown,
394        component: ComponentId::PROXY,
395        public_message: "Proxy transport is unavailable",
396        severity: ErrorSeverity::Error,
397        recovery_hint: RecoveryHint::Backoff,
398        backtrace: BacktracePolicy::Never,
399        exposure: Exposure::Generic,
400        fields: [fields::MESSAGE_PRESENT],
401        projection: {
402            remoting: RemotingResponseCode::SystemError,
403            grpc: {
404                payload: GrpcPayloadCode::InternalError,
405                status: GrpcStatusCode::Unavailable,
406            },
407            http: HttpStatusCode::SERVICE_UNAVAILABLE,
408            cli: CliExitCode::UNAVAILABLE,
409        },
410    }
411    /// A Proxy request supplied an invalid message identifier.
412    PROXY_MESSAGE_ID_INVALID {
413        code: "proxy.message.id.invalid",
414        class: ErrorClass::VALIDATION,
415        condition: CanonicalCondition::InvalidArgument,
416        fault: FaultAttribution::Caller,
417        component: ComponentId::PROXY,
418        public_message: "Message id is invalid",
419        severity: ErrorSeverity::Info,
420        recovery_hint: RecoveryHint::Never,
421        backtrace: BacktracePolicy::Never,
422        exposure: Exposure::Generic,
423        fields: [fields::MESSAGE_PRESENT],
424        projection: {
425            remoting: RemotingResponseCode::MessageIllegal,
426            grpc: {
427                payload: GrpcPayloadCode::IllegalMessageId,
428                status: GrpcStatusCode::InvalidArgument,
429            },
430            http: HttpStatusCode::BAD_REQUEST,
431            cli: CliExitCode::USAGE,
432        },
433    }
434    /// A Proxy request supplied an invalid transaction identifier.
435    PROXY_TRANSACTION_ID_INVALID {
436        code: "proxy.transaction.id.invalid",
437        class: ErrorClass::VALIDATION,
438        condition: CanonicalCondition::InvalidArgument,
439        fault: FaultAttribution::Caller,
440        component: ComponentId::PROXY,
441        public_message: "Transaction id is invalid",
442        severity: ErrorSeverity::Info,
443        recovery_hint: RecoveryHint::Never,
444        backtrace: BacktracePolicy::Never,
445        exposure: Exposure::Generic,
446        fields: [fields::MESSAGE_PRESENT],
447        projection: {
448            remoting: RemotingResponseCode::SystemError,
449            grpc: {
450                payload: GrpcPayloadCode::InvalidTransactionId,
451                status: GrpcStatusCode::InvalidArgument,
452            },
453            http: HttpStatusCode::BAD_REQUEST,
454            cli: CliExitCode::USAGE,
455        },
456    }
457    /// A Proxy request supplied an invalid message group.
458    PROXY_MESSAGE_GROUP_INVALID {
459        code: "proxy.message.group.invalid",
460        class: ErrorClass::VALIDATION,
461        condition: CanonicalCondition::InvalidArgument,
462        fault: FaultAttribution::Caller,
463        component: ComponentId::PROXY,
464        public_message: "Message group is invalid",
465        severity: ErrorSeverity::Info,
466        recovery_hint: RecoveryHint::Never,
467        backtrace: BacktracePolicy::Never,
468        exposure: Exposure::Generic,
469        fields: [fields::MESSAGE_PRESENT],
470        projection: {
471            remoting: RemotingResponseCode::MessageIllegal,
472            grpc: {
473                payload: GrpcPayloadCode::IllegalMessageGroup,
474                status: GrpcStatusCode::InvalidArgument,
475            },
476            http: HttpStatusCode::BAD_REQUEST,
477            cli: CliExitCode::USAGE,
478        },
479    }
480    /// A Proxy request supplied an invalid delivery time.
481    PROXY_DELIVERY_TIME_INVALID {
482        code: "proxy.delivery.time.invalid",
483        class: ErrorClass::VALIDATION,
484        condition: CanonicalCondition::InvalidArgument,
485        fault: FaultAttribution::Caller,
486        component: ComponentId::PROXY,
487        public_message: "Delivery time is invalid",
488        severity: ErrorSeverity::Info,
489        recovery_hint: RecoveryHint::Never,
490        backtrace: BacktracePolicy::Never,
491        exposure: Exposure::Generic,
492        fields: [fields::MESSAGE_PRESENT],
493        projection: {
494            remoting: RemotingResponseCode::MessageIllegal,
495            grpc: {
496                payload: GrpcPayloadCode::IllegalDeliveryTime,
497                status: GrpcStatusCode::InvalidArgument,
498            },
499            http: HttpStatusCode::BAD_REQUEST,
500            cli: CliExitCode::USAGE,
501        },
502    }
503    /// A Proxy request supplied an invalid polling time.
504    PROXY_POLLING_TIME_INVALID {
505        code: "proxy.polling.time.invalid",
506        class: ErrorClass::VALIDATION,
507        condition: CanonicalCondition::InvalidArgument,
508        fault: FaultAttribution::Caller,
509        component: ComponentId::PROXY,
510        public_message: "Polling time is invalid",
511        severity: ErrorSeverity::Info,
512        recovery_hint: RecoveryHint::Never,
513        backtrace: BacktracePolicy::Never,
514        exposure: Exposure::Generic,
515        fields: [fields::MESSAGE_PRESENT],
516        projection: {
517            remoting: RemotingResponseCode::SystemError,
518            grpc: {
519                payload: GrpcPayloadCode::IllegalPollingTime,
520                status: GrpcStatusCode::InvalidArgument,
521            },
522            http: HttpStatusCode::BAD_REQUEST,
523            cli: CliExitCode::USAGE,
524        },
525    }
526    /// A Proxy request supplied an invalid offset.
527    PROXY_OFFSET_INVALID {
528        code: "proxy.offset.invalid",
529        class: ErrorClass::VALIDATION,
530        condition: CanonicalCondition::InvalidArgument,
531        fault: FaultAttribution::Caller,
532        component: ComponentId::PROXY,
533        public_message: "Offset is invalid",
534        severity: ErrorSeverity::Info,
535        recovery_hint: RecoveryHint::Never,
536        backtrace: BacktracePolicy::Never,
537        exposure: Exposure::Generic,
538        fields: [fields::MESSAGE_PRESENT],
539        projection: {
540            remoting: RemotingResponseCode::PullOffsetMoved,
541            grpc: {
542                payload: GrpcPayloadCode::IllegalOffset,
543                status: GrpcStatusCode::InvalidArgument,
544            },
545            http: HttpStatusCode::BAD_REQUEST,
546            cli: CliExitCode::USAGE,
547        },
548    }
549    /// A Proxy request supplied an invalid invisible time.
550    PROXY_INVISIBLE_TIME_INVALID {
551        code: "proxy.invisible.time.invalid",
552        class: ErrorClass::VALIDATION,
553        condition: CanonicalCondition::InvalidArgument,
554        fault: FaultAttribution::Caller,
555        component: ComponentId::PROXY,
556        public_message: "Invisible time is invalid",
557        severity: ErrorSeverity::Info,
558        recovery_hint: RecoveryHint::Never,
559        backtrace: BacktracePolicy::Never,
560        exposure: Exposure::Generic,
561        fields: [fields::MESSAGE_PRESENT],
562        projection: {
563            remoting: RemotingResponseCode::SystemError,
564            grpc: {
565                payload: GrpcPayloadCode::IllegalInvisibleTime,
566                status: GrpcStatusCode::InvalidArgument,
567            },
568            http: HttpStatusCode::BAD_REQUEST,
569            cli: CliExitCode::USAGE,
570        },
571    }
572    /// A Proxy request supplied an invalid filter expression.
573    PROXY_FILTER_EXPRESSION_INVALID {
574        code: "proxy.filter.expression.invalid",
575        class: ErrorClass::VALIDATION,
576        condition: CanonicalCondition::InvalidArgument,
577        fault: FaultAttribution::Caller,
578        component: ComponentId::PROXY,
579        public_message: "Filter expression is invalid",
580        severity: ErrorSeverity::Info,
581        recovery_hint: RecoveryHint::Never,
582        backtrace: BacktracePolicy::Never,
583        exposure: Exposure::Generic,
584        fields: [fields::MESSAGE_PRESENT],
585        projection: {
586            remoting: RemotingResponseCode::SubscriptionParseFailed,
587            grpc: {
588                payload: GrpcPayloadCode::IllegalFilterExpression,
589                status: GrpcStatusCode::InvalidArgument,
590            },
591            http: HttpStatusCode::BAD_REQUEST,
592            cli: CliExitCode::USAGE,
593        },
594    }
595    /// A Proxy request supplied an invalid receipt handle.
596    PROXY_RECEIPT_HANDLE_INVALID {
597        code: "proxy.receipt.handle.invalid",
598        class: ErrorClass::VALIDATION,
599        condition: CanonicalCondition::InvalidArgument,
600        fault: FaultAttribution::Caller,
601        component: ComponentId::PROXY,
602        public_message: "Receipt handle is invalid",
603        severity: ErrorSeverity::Info,
604        recovery_hint: RecoveryHint::Never,
605        backtrace: BacktracePolicy::Never,
606        exposure: Exposure::Generic,
607        fields: [fields::MESSAGE_PRESENT],
608        projection: {
609            remoting: RemotingResponseCode::SystemError,
610            grpc: {
611                payload: GrpcPayloadCode::InvalidReceiptHandle,
612                status: GrpcStatusCode::InvalidArgument,
613            },
614            http: HttpStatusCode::BAD_REQUEST,
615            cli: CliExitCode::USAGE,
616        },
617    }
618    /// A Proxy request supplied an invalid lite topic.
619    PROXY_LITE_TOPIC_INVALID {
620        code: "proxy.lite_topic.invalid",
621        class: ErrorClass::VALIDATION,
622        condition: CanonicalCondition::InvalidArgument,
623        fault: FaultAttribution::Caller,
624        component: ComponentId::PROXY,
625        public_message: "Lite topic is invalid",
626        severity: ErrorSeverity::Info,
627        recovery_hint: RecoveryHint::Never,
628        backtrace: BacktracePolicy::Never,
629        exposure: Exposure::Generic,
630        fields: [fields::MESSAGE_PRESENT],
631        projection: {
632            remoting: RemotingResponseCode::SystemError,
633            grpc: {
634                payload: GrpcPayloadCode::IllegalLiteTopic,
635                status: GrpcStatusCode::InvalidArgument,
636            },
637            http: HttpStatusCode::BAD_REQUEST,
638            cli: CliExitCode::USAGE,
639        },
640    }
641    /// A Proxy lite-subscription quota was exhausted.
642    PROXY_LITE_SUBSCRIPTION_QUOTA_EXCEEDED {
643        code: "proxy.lite_subscription.quota_exceeded",
644        class: ErrorClass::CAPACITY,
645        condition: CanonicalCondition::ResourceExhausted,
646        fault: FaultAttribution::LocalResource,
647        component: ComponentId::PROXY,
648        public_message: "Lite subscription quota is exceeded",
649        severity: ErrorSeverity::Warn,
650        recovery_hint: RecoveryHint::Backoff,
651        backtrace: BacktracePolicy::Never,
652        exposure: Exposure::Generic,
653        fields: [fields::MESSAGE_PRESENT],
654        projection: {
655            remoting: RemotingResponseCode::SystemError,
656            grpc: {
657                payload: GrpcPayloadCode::LiteSubscriptionQuotaExceeded,
658                status: GrpcStatusCode::ResourceExhausted,
659            },
660            http: HttpStatusCode::TOO_MANY_REQUESTS,
661            cli: CliExitCode::TEMPORARY_FAILURE,
662        },
663    }
664    /// A Proxy request supplied a message property that conflicts with its message type.
665    PROXY_MESSAGE_PROPERTY_CONFLICT {
666        code: "proxy.message.property_conflict",
667        class: ErrorClass::VALIDATION,
668        condition: CanonicalCondition::InvalidArgument,
669        fault: FaultAttribution::Caller,
670        component: ComponentId::PROXY,
671        public_message: "Message property conflicts with message type",
672        severity: ErrorSeverity::Info,
673        recovery_hint: RecoveryHint::Never,
674        backtrace: BacktracePolicy::Never,
675        exposure: Exposure::Generic,
676        fields: [fields::MESSAGE_PRESENT],
677        projection: {
678            remoting: RemotingResponseCode::MessageIllegal,
679            grpc: {
680                payload: GrpcPayloadCode::MessagePropertyConflictWithType,
681                status: GrpcStatusCode::InvalidArgument,
682            },
683            http: HttpStatusCode::BAD_REQUEST,
684            cli: CliExitCode::USAGE,
685        },
686    }
687    /// Authoritative Proxy client settings are unavailable.
688    PROXY_SETTINGS_UNAVAILABLE {
689        code: "proxy.settings.unavailable",
690        class: ErrorClass::VALIDATION,
691        condition: CanonicalCondition::FailedPrecondition,
692        fault: FaultAttribution::Configuration,
693        component: ComponentId::PROXY,
694        public_message: "Authoritative client settings are unavailable",
695        severity: ErrorSeverity::Error,
696        recovery_hint: RecoveryHint::OperatorAction,
697        backtrace: BacktracePolicy::Never,
698        exposure: Exposure::Generic,
699        fields: [fields::MESSAGE_PRESENT],
700        projection: {
701            remoting: RemotingResponseCode::SystemError,
702            grpc: {
703                payload: GrpcPayloadCode::InternalError,
704                status: GrpcStatusCode::FailedPrecondition,
705            },
706            http: HttpStatusCode::CONFLICT,
707            cli: CliExitCode::CONFIG,
708        },
709    }
710    /// A remoting request could not be decoded or validated by the Proxy.
711    PROXY_REMOTING_REQUEST_INVALID {
712        code: "proxy.remoting.request.invalid",
713        class: ErrorClass::VALIDATION,
714        condition: CanonicalCondition::InvalidArgument,
715        fault: FaultAttribution::Caller,
716        component: ComponentId::PROXY,
717        public_message: "Proxy remoting request is invalid",
718        severity: ErrorSeverity::Info,
719        recovery_hint: RecoveryHint::Never,
720        backtrace: BacktracePolicy::Never,
721        exposure: Exposure::Generic,
722        fields: [fields::OPERATION_DIAGNOSTIC, fields::SOURCE_PRESENT],
723        projection: {
724            remoting: RemotingResponseCode::SystemError,
725            grpc: {
726                payload: GrpcPayloadCode::BadRequest,
727                status: GrpcStatusCode::InvalidArgument,
728            },
729            http: HttpStatusCode::BAD_REQUEST,
730            cli: CliExitCode::USAGE,
731        },
732    }
733    /// An upstream request issued by the Proxy failed.
734    PROXY_UPSTREAM_REQUEST_FAILED {
735        code: "proxy.upstream.request.failed",
736        class: ErrorClass::UNAVAILABLE,
737        condition: CanonicalCondition::Unavailable,
738        fault: FaultAttribution::Dependency,
739        component: ComponentId::PROXY,
740        public_message: "Proxy upstream request failed",
741        severity: ErrorSeverity::Error,
742        recovery_hint: RecoveryHint::Backoff,
743        backtrace: BacktracePolicy::Never,
744        exposure: Exposure::Generic,
745        fields: [fields::OPERATION_DIAGNOSTIC, fields::SOURCE_PRESENT],
746        projection: {
747            remoting: RemotingResponseCode::SystemError,
748            grpc: {
749                payload: GrpcPayloadCode::InternalError,
750                status: GrpcStatusCode::Unavailable,
751            },
752            http: HttpStatusCode::SERVICE_UNAVAILABLE,
753            cli: CliExitCode::UNAVAILABLE,
754        },
755    }
756    /// Proxy drain lifecycle or readiness state is unavailable.
757    PROXY_DRAIN_UNAVAILABLE {
758        code: "proxy.drain.unavailable",
759        class: ErrorClass::UNAVAILABLE,
760        condition: CanonicalCondition::Unavailable,
761        fault: FaultAttribution::LocalResource,
762        component: ComponentId::PROXY,
763        public_message: "Proxy drain service is unavailable",
764        severity: ErrorSeverity::Error,
765        recovery_hint: RecoveryHint::OperatorAction,
766        backtrace: BacktracePolicy::Never,
767        exposure: Exposure::Generic,
768        fields: [fields::OPERATION_DIAGNOSTIC, fields::SOURCE_PRESENT],
769        projection: {
770            remoting: RemotingResponseCode::ServiceNotAvailable,
771            grpc: {
772                payload: GrpcPayloadCode::InternalError,
773                status: GrpcStatusCode::Unavailable,
774            },
775            http: HttpStatusCode::SERVICE_UNAVAILABLE,
776            cli: CliExitCode::UNAVAILABLE,
777        },
778    }
779}