Allow hooks to break and return a custom error.