valid-error-codes
Overview
This rule belongs to the apimatic-preliminary-validation ruleset and states that:
Only valid status codes from range 4XX (client errors) and 5XX (server errors) must be used for endpoint error definitions.
| Property | Value |
|---|---|
| Enabled | Yes |
| Maximum Severity | Error |
| Message | Invalid error response status code found. |
| Code | APIMATICPRE_V302 |
| Type | Validation |
| Rule System | Semantic |
| Broad Category | Endpoint Responses |
| Products Impacted | Code Generation, Developer Experience Portal, API Transformer |
| Tags | preliminary checks validation apimatic http status error response endpoint api |
Suggested Fixes
- Remove error definition containing invalid error code.
- Error code must belong to range range 4XX or 5XX.