mirror of
https://github.com/peter-evans/repository-dispatch.git
synced 2026-06-11 03:11:28 +00:00
fix: deprecation of @octokit/request-error error.code (#245)
This commit is contained in:
2
dist/index.js
vendored
2
dist/index.js
vendored
@@ -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)
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user