fix: log Gitea transport failure causes

This commit is contained in:
2026-07-16 21:53:46 +02:00
parent 1988b8a7be
commit e12c11b8cb
3 changed files with 24 additions and 3 deletions
+7 -1
View File
@@ -123,7 +123,13 @@ export function statusMarker(issue: number, mode: Mode): Marker {
}
export function formatError(error: unknown): string {
if (error instanceof Error) return error.message;
if (error instanceof Error) {
if (error.cause === undefined) return error.message;
const cause = formatError(error.cause);
return cause && cause !== error.message
? `${error.message}: ${cause}`
: error.message;
}
return String(error);
}