Merge pull request #1577 from dpalou/MOBILE-2699

MOBILE-2699 login: Fix detailed error messages with http
main
Juan Leyva 2018-10-23 16:54:21 +02:00 committed by GitHub
commit 47d57a343d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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) ||