Display custom hook error messages when automatic merge is enabled

Merged Douglas Barbosa Alexandre requested to merge fix/29125-ee into master

Screenshots (if relevant)

out

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

Closes gitlab-org/gitlab-ce#29125