codex-team / codex-team/hawk.javascript

Bad plain object handling as PromiseRejectionEvent reason

Open
#171 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
32
Forks
4
PR merge metrics
No merged PRs in 30d

Description

Currently when a promise is rejected with a plain object instead of an Error `Promise.reject({ code: 42, detail: 'oops' })`, the catcher loses the object content - `String(obj)` produces `"[object Object]"`.

The console catcher also falls back to `event.reason?.message || String(event.reason)`, which either picks up an accidental `message` property or produces the same useless string.

Image

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.