Improved error dialog on post action failure
Refactoring