web-development-with-node-and-express icon indicating copy to clipboard operation
web-development-with-node-and-express copied to clipboard

ch15: api domain error handling

Open teemuniiranen opened this issue 9 years ago • 0 comments

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?

teemuniiranen avatar Jun 29 '16 05:06 teemuniiranen