mirror of
https://github.com/DSpace/dspace-angular.git
synced 2025-10-15 22:13:02 +00:00
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:
@@ -576,8 +576,10 @@ export class SubmissionService {
|
||||
find((submissionObjects: SubmissionObject[]) => isNotUndefined(submissionObjects)),
|
||||
map((submissionObjects: SubmissionObject[]) => createSuccessfulRemoteDataObject(
|
||||
submissionObjects[0])),
|
||||
catchError((errorResponse: ErrorResponse) => {
|
||||
return createFailedRemoteDataObject$<SubmissionObject>(errorResponse.errorMessage, errorResponse.statusCode);
|
||||
catchError((errorResponse: unknown) => {
|
||||
if (errorResponse instanceof ErrorResponse) {
|
||||
return createFailedRemoteDataObject$<SubmissionObject>(errorResponse.errorMessage, errorResponse.statusCode);
|
||||
}
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user