{
  "401_missing_header": {
    "error": "Unauthorized",
    "message": "Missing Basic credentials."
  },
  "401_invalid_format": {
    "error": "Unauthorized",
    "message": "Invalid credentials format."
  },
  "401_invalid_key": {
    "error": "Unauthorized",
    "message": "Invalid write key."
  },
  "400_missing_source_table": {
    "error": "ValidationError",
    "issues": [
      {
        "path": "source_table",
        "message": "Required",
        "code": "invalid_type"
      }
    ]
  },
  "400_empty_rows": {
    "error": "ValidationError",
    "issues": [
      {
        "path": "rows",
        "message": "rows must contain at least one row.",
        "code": "too_small"
      }
    ]
  },
  "400_column_validation_failed": {
    "error": "ColumnValidationFailed",
    "message": "One or more rows failed schema validation.",
    "details": {
      "errors": [
        {
          "index": 0,
          "issues": [
            { "path": "amount", "expected": "Decimal(18, 2) (max 2 decimal place(s))", "got": "string '99.999'" }
          ]
        },
        {
          "index": 2,
          "issues": [
            { "path": "order_id", "expected": "String", "got": "missing" }
          ]
        },
        {
          "index": 3,
          "issues": [
            { "path": "_cdp_raw_id", "expected": "a caller-writable column", "got": "reserved CDP ingest column" }
          ]
        },
        {
          "index": 4,
          "issues": [
            { "path": "(row)", "expected": "at least one column of raw_data.my_events", "got": "3 key(s), none matching a column" }
          ]
        }
      ]
    }
  },
  "403_source_table_not_allowed": {
    "error": "Forbidden",
    "message": "Write key is not allowed to write to source_table \"my_events\"."
  },
  "404_source_table_not_registered": {
    "error": "SourceTableNotRegistered",
    "message": "source_table \"my_events\" is not enabled for the API channel."
  },
  "409_raw_table_missing": {
    "error": "RawTableMissing",
    "message": "Raw table for \"my_events\" no longer exists. Cache invalidated; retry may succeed."
  },
  "502_clickhouse_insert_failed": {
    "error": "ClickHouseInsertFailed",
    "message": "Insert into raw_data.my_events failed.",
    "details": {
      "cause": "<database error message>"
    }
  },
  "500_internal_server_error": {
    "error": "InternalServerError"
  }
}
