process error messages before showing them