Build 3: Modified error handler to support ewdrest module