Added flash message support for error.