MOBILE-2699 login: Fix detailed error messages with http

main
dpalou 2018-10-23 15:18:10 +02:00
parent 7b117d802e
commit f465cdb4fe
1 changed files with 4 additions and 0 deletions

View File

@ -260,6 +260,10 @@ export class CoreSitesProvider {
protocol = protocol == 'https://' ? 'http://' : 'https://';
return this.checkSiteWithProtocol(siteUrl, protocol).catch((secondError) => {
if (secondError.critical) {
return Promise.reject(secondError.error);
}
// Site doesn't exist. Return the error message.
return Promise.reject(this.textUtils.getErrorMessageFromError(error) ||
this.textUtils.getErrorMessageFromError(secondError) ||