Generate flash for error messages