codex-team / codex-team/hawk.javascript
Bad plain object handling as PromiseRejectionEvent reason
Đang mở
- Ngôn ngữ chính
- TypeScript
- Star
- 32
- Fork
- 4
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.