credmark.cmf.model.errors.ModelNotFoundErrorDTO

DTO class ModelNotFoundErrorDTO(*, type, message, stack=[], code='generic', detail=None, permanent=False)[source]

Bases: ModelErrorDTO[SlugAndVersionDTO]

A model requested to run was not found.

The detail contains the fields: - slug: Slug of model not found - version: Version of model not found

Show JSON schema
{
   "title": "ModelNotFoundErrorDTO",
   "description": "A model requested to run was not found.\n\nThe detail contains the fields:\n- slug: Slug of model not found\n- version: Version of model not found",
   "type": "object",
   "properties": {
      "type": {
         "title": "Type",
         "description": "Error type",
         "type": "string"
      },
      "message": {
         "title": "Message",
         "description": "Error message",
         "type": "string"
      },
      "stack": {
         "title": "Stack",
         "description": "Model call stack. Last element is the model that raised the error.",
         "default": [],
         "type": "array",
         "items": {
            "$ref": "#/definitions/ModelCallStackEntry"
         }
      },
      "code": {
         "title": "Code",
         "description": "Short identifier for the type of error",
         "default": "generic",
         "type": "string"
      },
      "detail": {
         "title": "Detail",
         "description": "Arbitrary data object related to the error.",
         "allOf": [
            {
               "$ref": "#/definitions/SlugAndVersionDTO"
            }
         ]
      },
      "permanent": {
         "title": "Permanent",
         "description": "If true, the error will always give the same result for the same context.",
         "default": false,
         "type": "boolean"
      }
   },
   "required": [
      "type",
      "message",
      "stack",
      "code",
      "permanent"
   ],
   "definitions": {
      "ModelCallStackEntry": {
         "title": "ModelCallStackEntry",
         "description": "An item in an error's call stack.",
         "type": "object",
         "properties": {
            "slug": {
               "title": "Slug",
               "description": "Model slug",
               "type": "string"
            },
            "version": {
               "title": "Version",
               "description": "Model version",
               "type": "string"
            },
            "chainId": {
               "title": "Chainid",
               "description": "Context chain id",
               "type": "integer"
            },
            "blockNumber": {
               "title": "Blocknumber",
               "description": "Context block number",
               "type": "integer"
            },
            "input": {
               "title": "Input",
               "description": "Context input"
            },
            "trace": {
               "title": "Trace",
               "description": "Trace of code that generated the error",
               "type": "string"
            }
         },
         "required": [
            "slug",
            "version"
         ]
      },
      "SlugAndVersionDTO": {
         "title": "SlugAndVersionDTO",
         "type": "object",
         "properties": {
            "slug": {
               "title": "Slug",
               "type": "string"
            },
            "version": {
               "title": "Version",
               "type": "string"
            }
         },
         "required": [
            "slug"
         ]
      }
   }
}

Fields
Parameters
  • type (<pydantic.fields.DeferredType object at 0x7f81797e9280>) –

  • message (<pydantic.fields.DeferredType object at 0x7f81797e9340>) –

  • stack (<pydantic.fields.DeferredType object at 0x7f81797e9400>) –

  • code (<pydantic.fields.DeferredType object at 0x7f81797e94f0>) –

  • detail (<pydantic.fields.DeferredType object at 0x7f81797e96a0>) –

  • permanent (<pydantic.fields.DeferredType object at 0x7f81797e9760>) –

Return type

None

field code: str = 'generic'

Short identifier for the type of error

field detail: Union[DetailDTOClass, None] = None

Arbitrary data object related to the error.

field message: str [Required]

Error message

field permanent: bool = False

If true, the error will always give the same result for the same context.

field stack: List[ModelCallStackEntry] = []

Model call stack. Last element is the model that raised the error.

field type: str [Required]

Ex. ‘ModelDataError’, ‘ModelRunError’, ‘ModelInputError’

Error type

classmethod schema(by_alias=None, ref_template=None)