Skip to content

Commit bf47d10

Browse files
authored
fix: deprecation of @octokit/request-error error.code (#245)
1 parent c5deef1 commit bf47d10

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

dist/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ const github = __importStar(__nccwpck_require__(5438));
4444
const util_1 = __nccwpck_require__(3837);
4545
/* eslint-disable @typescript-eslint/no-explicit-any */
4646
function hasErrorStatus(error) {
47-
return typeof error.code === 'number';
47+
return typeof error.status === 'number';
4848
}
4949
function getErrorMessage(error) {
5050
if (error instanceof Error)

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {inspect} from 'util'
44

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

1010
function getErrorMessage(error: unknown) {

0 commit comments

Comments
 (0)