{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://fdc3.finos.org/schemas/2.1/bridging/raiseIntentAgentErrorResponse.schema.json",
  "title": "RaiseIntent Agent Error Response",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/$defs/RaiseIntentErrorResponseBase"
    },
    {
      "$ref": "agentErrorResponse.schema.json"
    }
  ],
  "$defs": {
    "RaiseIntentErrorResponseBase": {
      "title": "RaiseIntent Error Response",
      "type": "object",
      "description": "A response to a request to raise an intent that contains an error.",
      "properties": {
        "type": {
          "title": "RaiseIntent Response Message type",
          "const": "raiseIntentResponse"
        },
        "payload": {
          "title": "RaiseIntent Error Response Payload",
          "type": "object",
          "properties": {
            "error": {
              "title": "RaiseIntent Error Message",
              "oneOf": [
                { "$ref": "../api/api.schema.json#/definitions/ResolveError" },
                { "$ref": "../api/api.schema.json#/definitions/BridgingError" }
              ]
            }
          },
          "required": ["error"],
          "additionalProperties": false
        },
        "meta": {
          "title": "RaiseIntent Response Metadata",
          "type": "object"
        }
      },
      "additionalProperties": false
    }
  }
}
