Skip to content

Commit 7c16cc1

Browse files
fix: preserve original error in requestSessionResult
Wrapping the caught error with new Error(e) coerced it to the string "[object Object]" and discarded the original stack trace. Log the failure with context and rethrow the original error instead. Fixes #28 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent d57ecc3 commit 7c16cc1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

server/src/services/IrmaService.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ export default class {
7272
}
7373

7474
return result;
75-
} catch (e: any) {
76-
// TODO: Fix error handling
77-
throw new Error(e);
75+
} catch (e) {
76+
Logger.error('IrmaService.requestSessionResult failed for session %s: %o', token, e);
77+
throw e;
7878
}
7979
};
8080
}

0 commit comments

Comments
 (0)