Custom error message + hide generic message I'm working with the Brightcove Drupal module, and want to override generic error messages for users when an upload fails. I've added a custom error - but the generic message is still displaying before the custom message as follows:


Notice: Undefined index: widget in brightcove_field_browser_validate() (line 296 of /path/to/sites/all/modules/my_module/my_module/my_module.module).
This video is currently unavailable. Please note, it may take several minutes for large files to finish processing after being uploaded.


I can post code from the module if needed, but wasn't sure if this could be updated globally to always hide this type of message for users while still keeping custom 'user-friendly' messages.

Thanks!
you can use the theme_status_messages function to do search and suppress certain messages.

The String Overrides module lets you do global text replacements which should work in your case.