{"version":3,"file":"IndexerServerFailureError.cjs","names":["BaseServerFailureError"],"sources":["../../src/types/IndexerServerFailureError.ts"],"sourcesContent":["import { BaseServerFailureError } from '@nadohq/shared';\nimport {\n  IndexerServerFailureResponse,\n  IndexerServerRequestType,\n} from './serverTypes';\n\n/**\n * Error thrown when the indexer service API returns a failure envelope (see\n * {@link IndexerServerFailureResponse}), either as a non-2xx HTTP response or a 2xx response\n * with `status: 'failure'`. The numeric error code is exposed directly on\n * {@link BaseServerFailureError.errorCode} for comparison against {@link INDEXER_ERROR_CODES}.\n *\n * The v2 REST endpoints do not return a failure envelope — they use plain HTTP error responses\n * without an `error_code` field, so this error is only thrown for the v1 query routes.\n */\nexport class IndexerServerFailureError extends BaseServerFailureError {\n  declare readonly responseData: IndexerServerFailureResponse;\n  declare readonly requestType: IndexerServerRequestType;\n\n  /**\n   * HTTP status code of the response, e.g. `400` for a malformed request.\n   */\n  readonly httpStatus: number;\n\n  constructor(responseData: IndexerServerFailureResponse, httpStatus: number) {\n    super(responseData, 'IndexerServerFailureError');\n    this.httpStatus = httpStatus;\n  }\n}\n"],"mappings":";;;;;;;;;;;;AAeA,IAAa,4BAAb,cAA+CA,eAAAA,uBAAuB;CASpE,YAAY,cAA4C,YAAoB;EAC1E,MAAM,cAAc,2BAA2B;EAC/C,KAAK,aAAa;CACpB;AACF"}