3 ms·
The implication here seems to be that comprehensive error handling & logging improves security. Silently swallowing errors is a common issue in async code and t
by lucideer 5y ago
The implication here seems to be that comprehensive error handling & logging improves security. Silently swallowing errors is a common issue in async code and that can be a major risk if those errors are indicative of security holes (or even active attack attempts).
The author seems to believe flat chains make it easier / more likely that errors will be caught and handled. That's probably true, it does seem easier to insert error handling code with flat promises, but it's certainly not done automatically.
Would be good if it was clearer on that point and to see more hard examples of actual error handling.
- dgb23 5y agoThere are also: https://nodejs.org/api/process.html#process_event_unhandledrejection https://nodejs.org/api/process.html#process_event_unhandledr... And for the browser: https://developer.mozilla.org/en-US/docs/Web/API/Window/unhandledrejection_event https://developer.mozilla.org/en-US/docs/Web/API/Window/unha... Not entirely sure of their utility though. But can be elegant or robust if applied correctly.