web-development-with-node-and-express
web-development-with-node-and-express copied to clipboard
ch15: api domain error handling
I tried to throw new error inside my rest route to test api domain with:
throw new Error("Yikes");
Middleware defined in the start of the meadowlark.js kicks in and prints "DOMAIN ERROR CAUGHT" to log. Why is not apiOptions.domain handling the error? Is this because the other one is defined first or am I understanding something wrong?