Fixes #3333: add the reason for deployment failure in the app logs