Improve hook error messages