MOBILE-3833 login: Display right error in 2.9-3.1 sites
parent
15f4856f81
commit
b6fbb6b4f7
|
@ -262,7 +262,7 @@ export class CoreSitesProvider {
|
|||
}
|
||||
|
||||
// Service supported but an error happened. Return error.
|
||||
if (error.errorcode == 'codingerror') {
|
||||
if (error.errorcode === 'codingerror') {
|
||||
// This could be caused by a redirect. Check if it's the case.
|
||||
const redirect = await CoreUtils.checkRedirect(siteUrl);
|
||||
|
||||
|
@ -272,6 +272,9 @@ export class CoreSitesProvider {
|
|||
// We can't be sure if there is a redirect or not. Display cannot connect error.
|
||||
error.message = Translate.instant('core.cannotconnecttrouble');
|
||||
}
|
||||
} else if (error.errorcode === 'invalidrecord') {
|
||||
// WebService not found, site not supported.
|
||||
error.message = Translate.instant('core.login.invalidmoodleversion', { $a: CoreSite.MINIMUM_MOODLE_VERSION });
|
||||
}
|
||||
|
||||
return new CoreSiteError({
|
||||
|
|
Loading…
Reference in New Issue