Error Handling

Error Code Mapping

The practice of translating internal application error codes or exception types to the appropriate protocol-level status codes — for example, mapping a PermissionDenied exception to HTTP 403 and gRPC status 7, or a ResourceNotFound error to HTTP 404 and gRPC status 5. Consistent mapping ensures clients receive machine-readable error codes rather than opaque 500 responses. Error code mapping tables are typically maintained in a central error catalogue or middleware layer.

Giao thức liên quan

Được đề cập trong hướng dẫn

Xem thêm