DEV Community

Discussion on: Preventing unhandled promise rejections in async functions

Collapse
 
gajus profile image
Gajus Kuizinas

For what it is worth, createRequest is just a light abstraction around got. It is got that uses a cancellable promise to implement cancel (/abort) functionality.

I do like your suggestion, though and I think it would be an improvement to got API. Please raise an issue with got. I am sure Sindre will appreciate the suggestion.