Error Codes
5/14/25Less than 1 minutecomponenterrcodehttpgrpc
Core Features of the Error Code Component
Services created by sponge provide a comprehensive error code system, supporting both HTTP and gRPC protocols, with the following core features:
Dual Protocol Support
- Simultaneously supports HTTP and gRPC error code systems
- Each protocol includes system-level and business-level error codes
Standard Protocol Conversion
- HTTP system-level error codes are converted to standard HTTP status codes as needed
- gRPC system-level error codes are converted to standard gRPC status codes as needed
Advanced Features
- Supports custom error message overwriting
- Supports intelligent mapping from gRPC error codes to HTTP error codes
Specification and Usage Example
Click to view Error Code Specification and Usage Example.