Throw exception and set approriate status if exception occurs in hook

Fixes #197