Raise an error for unsupported hook event

* Raises a ValueError for an unsupported hook event
Merge pull request #1527 from paul-matthews/restrict-hooks-access

Raise an error for unsupported hook event