Skip to main content



This rule belongs to the apimatic-codegen-validation ruleset and states that:

The key of an error template entry must be a valid error HTTP status code/range (e.g. 4XX, 500) or set to 0 to represent default/undeclared errors.

Maximum SeverityError
MessageError template key is invalid.
Rule SystemSemantic
Products ImpactedCode Generation, Developer Experience Portal
Tagsapimatic code generation codegen sdks portal docs validation apimatic key error template errors exceptions codegen setting endpoint setting

Suggested Fixes

  • The key must not be empty or null.
  • The key must not contain trailing or leading spaces.
  • For ranges, use "X" in upper case only. Ranges like 4xX or 4Xx are not valid.
  • XXX is not a valid range.
  • If only digits are used, the status must be a valid HTTP status code or 0.
  • Error status codes belong to the HTTP status ranges 4XX or 5XX.

For More Information