ESLint: fix rxjs/no-implicit-any-catch

In most cases we can deal with the untyped errors by introducing an explicit instanceof check

DspaceRestService includes an unsafe catch/rethrow → made it explicitly typed as `any`, but it should be revisited at some point
This commit is contained in:
Yury Bondarenko
2023-06-28 16:30:38 +02:00
parent 07259ca342
commit c0f43bc585
17 changed files with 106 additions and 76 deletions

View File

@@ -341,7 +341,9 @@ export class SubmissionSectionFormComponent extends SectionModelComponent {
message: msg,
path: '/sections/' + this.sectionData.id,
};
console.error(e.stack);
if (e instanceof Error) {
console.error(e.stack);
}
this.sectionService.setSectionError(this.submissionId, this.sectionData.id, sectionError);
}
}