## API Report File for "@backstage/errors"

> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).

```ts
import { JsonObject } from '@backstage/config';

// @public
export class AuthenticationError extends CustomErrorBase {}

// @public
export class ConflictError extends CustomErrorBase {}

// @public (undocumented)
export class CustomErrorBase extends Error {
  constructor(message?: string, cause?: Error);
  // (undocumented)
  readonly cause?: Error;
}

// @public
export function deserializeError<T extends Error = Error>(
  data: SerializedError,
): T;

// @public
export type ErrorResponse = {
  error: SerializedError;
  request?: {
    method: string;
    url: string;
  };
  response: {
    statusCode: number;
  };
};

// @public
export class InputError extends CustomErrorBase {}

// @public
export class NotAllowedError extends CustomErrorBase {}

// @public
export class NotFoundError extends CustomErrorBase {}

// @public
export class NotModifiedError extends CustomErrorBase {}

// @public
export function parseErrorResponse(response: Response): Promise<ErrorResponse>;

// @public
export class ResponseError extends Error {
  constructor(props: {
    message: string;
    response: Response;
    data: ErrorResponse;
    cause: Error;
  });
  readonly cause: Error;
  readonly data: ErrorResponse;
  static fromResponse(response: Response): Promise<ResponseError>;
  readonly response: Response;
}

// @public
export type SerializedError = JsonObject & {
  name: string;
  message: string;
  stack?: string;
  code?: string;
};

// @public
export function serializeError(
  error: Error,
  options?: {
    includeStack?: boolean;
  },
): SerializedError;
```
