Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Rejection is turned into an exception with "await", though. And rejection is perfectly normal with, say, network I/O.


Well yes, that's a reasonable use case. Personally I'm not convinced that all 4xx responses should be rejections, but regardless of that, you should have about as many `catch` blocks with async-await as you have with promises.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: