{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/flareapp-io/json-schema/flareapp-io-error-occurrence-schema.json",
  "title": "errorOccurrence",
  "x-generated": "2026-11-08",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/_original/flareapp-io-api-openapi.yml#/components/schemas/errorOccurrence",
  "allOf": [
    {
      "$ref": "#/$defs/baseErrorOccurrence"
    },
    {
      "type": [
        "object"
      ],
      "properties": {
        "attributes": {
          "type": [
            "array"
          ],
          "description": "The attributes of the error occurrence.",
          "items": {
            "$ref": "#/$defs/errorOccurrenceContextItem"
          }
        },
        "frames": {
          "type": [
            "array"
          ],
          "description": "The frames of the error occurrence.",
          "items": {
            "$ref": "#/$defs/errorOccurrenceFrame"
          }
        },
        "events": {
          "type": [
            "array"
          ],
          "description": "The events of the error occurrence.",
          "items": {
            "$ref": "#/$defs/errorOccurrenceEvent"
          }
        },
        "previous_exceptions": {
          "type": [
            "array"
          ],
          "description": "The exception chain for this occurrence, excluding the top exception. Ordered from the immediate cause (order 0) to the root cause. Contains at most the first three previous exceptions.",
          "items": {
            "$ref": "#/$defs/errorOccurrencePreviousException"
          }
        },
        "solutions": {
          "type": [
            "array"
          ],
          "description": "The solutions of the error occurrence.",
          "items": {
            "$ref": "#/$defs/errorOccurrenceSolution"
          }
        },
        "has_solutions": {
          "type": [
            "boolean"
          ],
          "description": "Indicates if the error occurrence has solutions."
        },
        "error": {
          "$ref": "#/$defs/error"
        }
      }
    }
  ],
  "$defs": {
    "baseError": {
      "type": [
        "object"
      ],
      "properties": {
        "id": {
          "type": [
            "integer"
          ],
          "description": "The error's unique identifier."
        },
        "number": {
          "type": [
            "integer"
          ],
          "description": "The error's number. Unique within the project and increasing by one for each new error in the project."
        },
        "slug": {
          "type": [
            "string"
          ],
          "description": "The error's slug."
        },
        "entry_point_value": {
          "type": [
            "string"
          ],
          "description": "The raw entry point value. Full URL for web, command with args for CLI, job class for queue."
        },
        "entry_point": {
          "type": [
            "string"
          ],
          "deprecated": true,
          "description": "Deprecated. Use entry_point_value instead. Returns the same value as entry_point_value."
        },
        "entry_point_handler_identifier": {
          "type": [
            "string",
            "null"
          ],
          "description": "Groupable identifier for the entry point. Route pattern for web, command name for CLI, short job name for queue."
        },
        "entry_point_handler_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "The handler name. Controller, command class, job class, or null."
        },
        "entry_point_handler_type": {
          "type": [
            "string",
            "null"
          ],
          "description": "The kind of handler. Framework-prefixed type like laravel_controller, php_closure."
        },
        "exception_message": {
          "type": [
            "string"
          ],
          "description": "The exception message."
        },
        "exception_class": {
          "type": [
            "string"
          ],
          "description": "The exception class."
        },
        "exception_code": {
          "type": [
            "null",
            "string"
          ],
          "description": "The exception code."
        },
        "file": {
          "type": [
            "string"
          ],
          "description": "The file where the error occurred."
        },
        "line_number": {
          "type": [
            "integer"
          ],
          "description": "The line number where the error occurred."
        },
        "class": {
          "type": [
            "string"
          ],
          "description": "The class where the error occurred."
        },
        "method": {
          "type": [
            "string"
          ],
          "description": "The method where the error occurred."
        },
        "first_seen_at": {
          "type": [
            "string"
          ],
          "description": "The date and time when the error was first seen."
        },
        "last_seen_at": {
          "type": [
            "string"
          ],
          "description": "The date and time when the error was last seen."
        },
        "occurrence_count": {
          "type": [
            "integer"
          ],
          "description": "The number of times the error occurred."
        },
        "affected_user_count": {
          "type": [
            "integer"
          ],
          "description": "The number of users that were affected by the error."
        },
        "share_count": {
          "type": [
            "integer"
          ],
          "description": "The number of times the error was shared."
        },
        "notifier_client_name": {
          "type": [
            "string"
          ],
          "description": "The name of the notifier client."
        },
        "language_version": {
          "type": [
            "string"
          ],
          "description": "The version of the language."
        },
        "framework_version": {
          "type": [
            "string"
          ],
          "description": "The version of the framework."
        },
        "stage": {
          "type": [
            "string"
          ],
          "description": "The stage where the error occurred."
        },
        "entry_point_type": {
          "type": [
            "string"
          ],
          "enum": [
            "web",
            "cli",
            "queue"
          ],
          "description": "The type of the entry point."
        },
        "application_version": {
          "type": [
            "string"
          ],
          "description": "The version of the application."
        },
        "level": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "debug",
            "info",
            "notice",
            "warning",
            "error",
            "critical",
            "alert",
            "emergency"
          ],
          "description": "When a message is logged, this will be the level of the message."
        },
        "status": {
          "type": [
            "string"
          ],
          "enum": [
            "open",
            "resolved"
          ],
          "description": "The status of the error."
        },
        "resolved_by_user_name": {
          "type": [
            "null",
            "string"
          ],
          "description": "The name of the user that resolved the error."
        },
        "resolved_by_channel": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "slack",
            "telegram",
            "github",
            "mail",
            "flare",
            "api"
          ],
          "description": "The channel that resolved the error."
        },
        "resolved_by_channel_label": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "Slack",
            "Telegram",
            "GitHub",
            "Mail",
            "Flare",
            "API"
          ],
          "description": "The label of the channel that resolved the error."
        },
        "resolved_at": {
          "type": [
            "null",
            "string"
          ],
          "description": "The date and time when the error was resolved."
        },
        "language": {
          "type": [
            "string"
          ],
          "enum": [
            "PHP",
            "javascript"
          ],
          "description": "The language of the project."
        },
        "latest_occurrence_has_solutions": {
          "type": [
            "boolean"
          ],
          "description": "Indicates if the latest occurrence has solutions."
        },
        "snooze_type": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "snooze_until",
            "snooze_forever",
            "snooze_number_of_occurrences",
            "snooze_application_version"
          ],
          "description": "The type of the snooze."
        },
        "snoozed_at": {
          "type": [
            "null",
            "string"
          ],
          "description": "The date and time when the error was snoozed."
        },
        "snoozed_until": {
          "type": [
            "null",
            "string"
          ],
          "description": "The date and time until the error is snoozed."
        },
        "snoozed_up_to_occurrence_number": {
          "type": [
            "null",
            "integer"
          ],
          "description": "The number of occurrences the error is snoozed."
        },
        "snoozed_by_user_name": {
          "type": [
            "null",
            "string"
          ],
          "description": "The name of the user that snoozed the error."
        },
        "snoozed_by_channel": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "slack",
            "telegram",
            "github",
            "mail",
            "flare",
            "api"
          ],
          "description": "The channel that snoozed the error."
        },
        "snoozed_by_channel_label": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "Slack",
            "Telegram",
            "GitHub",
            "Mail",
            "Flare",
            "API"
          ],
          "description": "The label of the channel that snoozed the error."
        },
        "marked_for_deletion_by_user_name": {
          "type": [
            "null",
            "string"
          ],
          "description": "The name of the user that marked the error for deletion."
        },
        "marked_for_deletion_by_channel": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "slack",
            "telegram",
            "github",
            "mail",
            "flare"
          ],
          "description": "The channel that marked the error for deletion."
        },
        "assignees": {
          "type": [
            "array"
          ],
          "description": "The users assigned to the error.",
          "items": {
            "$ref": "#/$defs/minimalUser"
          }
        },
        "framework": {
          "type": [
            "null",
            "string"
          ],
          "description": "The framework name (e.g., \"laravel\", \"react\")."
        },
        "latest_occurrence_url_on_flare": {
          "type": [
            "null",
            "string"
          ],
          "description": "The URL to view the latest occurrence on Flare."
        }
      }
    },
    "baseErrorOccurrence": {
      "type": [
        "object"
      ],
      "properties": {
        "id": {
          "type": [
            "integer"
          ],
          "description": "The error occurrence's unique identifier."
        },
        "error_id": {
          "type": [
            "integer"
          ],
          "description": "The error's unique identifier."
        },
        "received_at": {
          "type": [
            "string"
          ],
          "description": "The date and time when the error occurrence was received."
        },
        "entry_point_value": {
          "type": [
            "null",
            "string"
          ],
          "description": "The raw entry point value. Full URL for web, command with args for CLI, job class for queue."
        },
        "entry_point": {
          "type": [
            "null",
            "string"
          ],
          "deprecated": true,
          "description": "Deprecated. Use entry_point_value instead. Returns the same value as entry_point_value."
        },
        "entry_point_handler_identifier": {
          "type": [
            "null",
            "string"
          ],
          "description": "Groupable identifier for the entry point."
        },
        "entry_point_handler_name": {
          "type": [
            "null",
            "string"
          ],
          "description": "The handler name. Controller, command class, job class, or null."
        },
        "entry_point_handler_type": {
          "type": [
            "null",
            "string"
          ],
          "description": "The kind of handler."
        },
        "exception_class": {
          "type": [
            "null",
            "string"
          ],
          "description": "The exception class."
        },
        "exception_message": {
          "type": [
            "null",
            "string"
          ],
          "description": "The exception message."
        },
        "exception_code": {
          "type": [
            "null",
            "string"
          ],
          "description": "The exception code."
        },
        "application_path": {
          "type": [
            "null",
            "string"
          ],
          "description": "The path of the application."
        },
        "application_version": {
          "type": [
            "null",
            "string"
          ],
          "description": "The version of the application."
        },
        "notifier_client_name": {
          "type": [
            "null",
            "string"
          ],
          "description": "The name of the notifier client."
        },
        "language_version": {
          "type": [
            "null",
            "string"
          ],
          "description": "The version of the language."
        },
        "framework_version": {
          "type": [
            "null",
            "string"
          ],
          "description": "The version of the framework."
        },
        "stage": {
          "type": [
            "null",
            "string"
          ],
          "description": "The stage where the error occurred."
        },
        "entry_point_type": {
          "type": [
            "null",
            "string"
          ],
          "enum": [
            "web",
            "cli",
            "queue"
          ],
          "description": "The type of the entry point."
        }
      }
    },
    "error": {
      "allOf": [
        {
          "$ref": "#/$defs/baseError"
        }
      ]
    },
    "errorOccurrenceContextItem": {
      "type": [
        "object"
      ],
      "properties": {
        "group": {
          "type": [
            "string"
          ],
          "description": "The group of the context item."
        },
        "key": {
          "type": [
            "string"
          ],
          "description": "The key of the context item."
        },
        "value": {
          "type": [
            "string"
          ],
          "description": "The value of the context item."
        }
      }
    },
    "errorOccurrenceEvent": {
      "type": [
        "object"
      ],
      "properties": {
        "id": {
          "type": [
            "integer"
          ],
          "description": "The event's unique identifier."
        },
        "microtime": {
          "type": [
            "integer"
          ],
          "description": "The time of the event."
        },
        "received_at": {
          "type": [
            "string"
          ],
          "description": "The date and time when the event was received."
        },
        "name": {
          "type": [
            "string"
          ],
          "description": "The name of the event."
        },
        "level": {
          "type": [
            "string"
          ],
          "description": "The message level of the event."
        },
        "meta_data": {
          "type": [
            "object"
          ],
          "description": "The meta data of the event."
        }
      }
    },
    "errorOccurrenceFrame": {
      "type": [
        "object"
      ],
      "properties": {
        "file": {
          "type": [
            "string"
          ],
          "description": "The file of the frame."
        },
        "relative_file": {
          "type": [
            "string"
          ],
          "description": "The relative file of the frame."
        },
        "line_number": {
          "type": [
            "integer"
          ],
          "description": "The line number of the frame."
        },
        "class": {
          "type": [
            "string"
          ],
          "description": "The class of the frame."
        },
        "method": {
          "type": [
            "string"
          ],
          "description": "The method of the frame."
        },
        "code_snippet": {
          "type": [
            "array"
          ],
          "description": "The code of the frame.",
          "items": {
            "type": [
              "string"
            ]
          }
        },
        "application_frame": {
          "type": [
            "boolean"
          ],
          "description": "Indicates if the frame is an application frame."
        }
      }
    },
    "errorOccurrencePreviousException": {
      "type": [
        "object"
      ],
      "properties": {
        "id": {
          "type": [
            "integer"
          ],
          "description": "The previous exception's unique identifier. Use this id to fetch its frames via /error-occurrences/{occurrence_id}/previous-exceptions/{previous_exception_id}."
        },
        "order": {
          "type": [
            "integer"
          ],
          "description": "The position of this exception in the chain, starting at 0 for the immediate cause of the top exception. Higher orders are deeper causes. The top exception itself is not part of this list."
        },
        "exception_class": {
          "type": [
            "string"
          ],
          "description": "The class of the previous exception."
        },
        "exception_message": {
          "type": [
            "string"
          ],
          "description": "The message of the previous exception."
        },
        "first_frame_file": {
          "type": [
            "string",
            "null"
          ],
          "description": "The file of the first frame of this previous exception's stack trace."
        },
        "first_frame_line_number": {
          "type": [
            "integer",
            "null"
          ],
          "description": "The line number of the first frame of this previous exception's stack trace."
        }
      }
    },
    "errorOccurrenceSolution": {
      "type": [
        "object"
      ],
      "properties": {
        "id": {
          "type": [
            "integer"
          ],
          "description": "The solution's unique identifier."
        },
        "title": {
          "type": [
            "string"
          ],
          "description": "The title of the solution."
        },
        "description": {
          "type": [
            "string"
          ],
          "description": "The description of the solution."
        },
        "links": {
          "type": [
            "array"
          ],
          "description": "Links to external resources.",
          "items": {
            "type": [
              "string"
            ]
          }
        },
        "action_description": {
          "type": [
            "string"
          ],
          "description": "The action description of the solution."
        },
        "is_runnable": {
          "type": [
            "boolean"
          ],
          "description": "Indicates if the solution is runnable."
        }
      }
    },
    "minimalUser": {
      "type": [
        "object"
      ],
      "properties": {
        "id": {
          "type": [
            "integer"
          ],
          "description": "The user's unique identifier."
        },
        "name": {
          "type": [
            "string"
          ],
          "description": "The user's name."
        },
        "email": {
          "type": [
            "string"
          ],
          "description": "The user's email address."
        },
        "github_id": {
          "type": [
            "null",
            "string"
          ],
          "description": "The user's GitHub ID."
        },
        "google_id": {
          "type": [
            "null",
            "string"
          ],
          "description": "The user's Google ID."
        }
      }
    }
  }
}