Disable Messages is a module that lets you specify message visibility settings for different roles or paths, eliminating confusing or unsightly error messages for users that don’t need to see them.
For example:
“Anonymous” and “authenticated” users can see “status” and “warning” message, but only users with “admin” and “dev” roles can see “error” messages.