MOBILE-3833 grades: Ignore notingroup error in prefetch
parent
81269498bd
commit
0060de1459
|
@ -100,7 +100,16 @@ export class CoreGradesCourseOptionHandlerService implements CoreCourseOptionsHa
|
||||||
* @return Promise resolved when done.
|
* @return Promise resolved when done.
|
||||||
*/
|
*/
|
||||||
async prefetch(course: CoreEnrolledCourseDataWithExtraInfoAndOptions): Promise<void> {
|
async prefetch(course: CoreEnrolledCourseDataWithExtraInfoAndOptions): Promise<void> {
|
||||||
|
try {
|
||||||
await CoreGrades.getCourseGradesTable(course.id, undefined, undefined, true);
|
await CoreGrades.getCourseGradesTable(course.id, undefined, undefined, true);
|
||||||
|
} catch (error) {
|
||||||
|
if (error.errorcode === 'notingroup') {
|
||||||
|
// Don't fail the download because of this error.
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue