Skip to content

Commit

Permalink
fix: deprecation of @octokit/request-error error.code (#245)
Browse files Browse the repository at this point in the history
  • Loading branch information
thijsvtol committed Sep 5, 2023
1 parent c5deef1 commit bf47d10
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ const github = __importStar(__nccwpck_require__(5438));
const util_1 = __nccwpck_require__(3837);
/* eslint-disable @typescript-eslint/no-explicit-any */
function hasErrorStatus(error) {
return typeof error.code === 'number';
return typeof error.status === 'number';
}
function getErrorMessage(error) {
if (error instanceof Error)
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {inspect} from 'util'

/* eslint-disable @typescript-eslint/no-explicit-any */
function hasErrorStatus(error: any): error is {status: number} {
return typeof error.code === 'number'
return typeof error.status === 'number'
}

function getErrorMessage(error: unknown) {
Expand Down

0 comments on commit bf47d10

Please sign in to comment.