mirror of
https://github.com/tdurieux/anonymous_github.git
synced 2026-12-04 01:53:28 +01:00
fix: handle production source failures and reduce ZIP work
This commit is contained in:
1 parent
bd7d6f0bef
commit
705f7c428a
16 files changed
+612
-86
No files matched your search
+4
-1
@@ -320,7 +320,10 @@ export function serializeError(err: unknown): Record<string, unknown> {
|
||||
|
||||
// AnonymousError carries an httpStatus and an inner cause.
|
||||
if (typeof e.httpStatus === "number") out.httpStatus = e.httpStatus;
|
||||
if (e.code !== undefined && e.code !== e.message) out.code = e.code;
|
||||
// Octokit's deprecated `code` getter emits a stack on every read. Only
|
||||
// inspect data properties so logging never invokes that getter.
|
||||
const code = Object.getOwnPropertyDescriptor(e, "code")?.value;
|
||||
if (code !== undefined && code !== e.message) out.code = code;
|
||||
if (typeof e.url === "function") {
|
||||
try {
|
||||
const u = e.url();
|
||||
|
||||
Reference in new issue
Block a user