@octokit/request-error

  • Version 2.1.0
  • Published
  • 21.9 kB
  • 3 dependencies
  • MIT license

Install

npm i @octokit/request-error
yarn add @octokit/request-error
pnpm add @octokit/request-error

Overview

Error class for Octokit request errors

Index

Classes

class RequestError

class RequestError extends Error {}
  • Error with extra properties to help with debugging

constructor

constructor(message: string, statusCode: number, options: RequestErrorOptions);

    property code

    code: number;
    • http status code

      Deprecated

      error.code is deprecated in favor of error.status

    property headers

    headers: any;
    • error response headers

      Deprecated

      error.headers is deprecated in favor of error.response.headers

    property name

    name: string;

      property request

      request: any;
      • Request options that lead to the error.

      property response

      response?: any;
      • Response object if a response was received

      property status

      status: number;
      • http status code

      Package Files (1)

      Dependencies (3)

      Dev Dependencies (14)

      Peer Dependencies (0)

      No peer dependencies.

      Badge

      To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

      You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@octokit/request-error.

      • Markdown
        [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@octokit/request-error)
      • HTML
        <a href="https://www.jsdocs.io/package/@octokit/request-error"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>