diff --git a/src/js/index.js b/src/js/index.js index 550aa15bc..bcf95423e 100644 --- a/src/js/index.js +++ b/src/js/index.js @@ -221,10 +221,13 @@ app.filter('prettyAppMessage', function () { if (app.health === HSTATES.UNHEALTHY) return 'The app is not responding to health checks. Check the logs for any error messages.'; } - var message = app.error ? app.error.message : ''; - if (message === 'ETRYAGAIN') return 'The DNS record for this location is not setup correctly. Please verify your DNS settings and repair this app.'; - if (message === 'DNS Record already exists') return 'The DNS record for this location already exists. Cloudron does not remove existing DNS records. Manually remove the DNS record and then click on repair.'; - return message; + if (app.error.reason === 'Access Denied') { + if (app.error.domain) return 'The DNS record for this location is not setup correctly. Please verify your DNS settings and repair this app.'; + } else if (app.error.reason === 'Already Exists') { + if (app.error.domain) return 'The DNS record for this location already exists. Cloudron does not remove existing DNS records. Manually remove the DNS record and then click on repair.'; + } + + return app.error.message; }; });