{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openlineage.io/spec/facets/1-0-0/ErrorMessageRunFacet.json",
  "$defs": {
    "ErrorMessageRunFacet": {
      "allOf": [
        {
          "$ref": "https://openlineage.io/spec/1-0-2/OpenLineage.json#/$defs/RunFacet"
        },
        {
          "type": "object",
          "properties": {
            "message": {
              "description": "A human-readable string representing error message generated by observed system",
              "type": "string",
              "example": "org.apache.spark.sql.AnalysisException: Table or view not found: wrong_table_name; line 1 pos 14"
            },
            "programmingLanguage": {
              "description": "Programming language the observed system uses.",
              "type": "string",
              "example": "JAVA"
            },
            "stackTrace": {
              "description": "A language-specific stack trace generated by observed system",
              "type": "string",
              "example": "Exception in thread \"main\" java.lang.RuntimeException: A test exception\nat io.openlineage.SomeClass.method(SomeClass.java:13)\nat io.openlineage.SomeClass.anotherMethod(SomeClass.java:9)"
            }
          },
          "required": ["message", "programmingLanguage"]
        }
      ],
      "type": "object"
    }
  },
  "type": "object",
  "properties": {
    "errorMessage": {
      "$ref": "#/$defs/ErrorMessageRunFacet"
    }
  }
}
