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