Skip to main content

predefined-exception-model-for-error

Overview

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

If an error response has a non-empty model name listed in its definition, a corresponding error model of "Exception" type must exist in the globally defined custom types.

PropertyValue
EnabledYes
Maximum SeverityError
MessageError response references a type which has no corresponding "Exception" type model definition.
CodeAPIMATICPRE_V303
TypeValidation
Rule SystemSemantic
Broad CategoryEndpoint Responses
Products ImpactedCode Generation, Developer Experience Portal, API Transformer
Tagspreliminary checks validation apimatic exception error response type custom type model complex model

Suggested Fixes

  • Define a model in custom types of type "Exception", assign it a unique name and then link it to the error response.
  • Make sure that the model you linked to the error response is of "Exception" type and not "Structure".

For More Information