Should an async API ever throw synchronously?
Ultimately the decision to synchronously throw or not is up to you, and you will likely find people who argue either side. The important thing is to document the behavior and maintain consistency in the behavior. My opinion on the matter is that your second option – passing the error into the callback – seems … Read more