mirror of
https://github.com/changesets/action
synced 2026-10-26 16:39:56 +08:00
Avoid hitting a deprecation warning when encountering errors from @octokit/request-error (#461)
* fix: use status when http err * tweak code * add changeset --------- Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
This commit is contained in:
co-authored by
Mateusz Burzyński
parent
c1f57e52f9
commit
e9c36b6964
@@ -96,3 +96,12 @@ export function sortTheThings(
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
export function isErrorWithCode(err: unknown, code: string) {
|
||||
return (
|
||||
typeof err === "object" &&
|
||||
err !== null &&
|
||||
"code" in err &&
|
||||
err.code === code
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user