CoreHttpError (src/core-http-error.ts)

firecrawl-mcp-server · src/core-http-error.ts · typescript · MIT
auth, tag:embed-classified

Error class that carries HTTP status for non-2xx responses.

// Source: https://github.com/firecrawl/firecrawl-mcp-server | License: MIT | Copyright 2025 vrknetha
// Provided via justclaw.it.com; keep this notice with the code.
/**
 * A non-2xx answer from Core on a path that does not go through the SDK. The
 * status travels with the error so a credential rejection stays recognisable
 * wherever it was raised, rather than being inferred from a message string.
 */
export class CoreHttpError extends Error {
  readonly status: number;

  constructor(message: string, status: number) {
    super(message);
    this.name = 'CoreHttpError';
    this.status = status;
  }
}

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key