Improves dialog to show the error message