codex-team / codex-team/hawk.javascript

Bad plain object handling as PromiseRejectionEvent reason

Đang mở
#171 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
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.

Image

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á.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.