Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/app/core/interceptors/error.interceptor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ export const errorInterceptor: HttpInterceptorFn = (req, next) => {
}
}

const serverErrorRegex = /5\d{2}/;

if (serverErrorRegex.test(error.status.toString())) {
errorMessage = error.error.message || 'common.errorMessages.serverError';
}

if (error.status === 401) {
if (!hasViewOnlyParam(router)) {
authService.logout();
Expand Down
6 changes: 4 additions & 2 deletions src/app/features/files/store/files.state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,8 @@ export class FilesState {
ctx.dispatch(new GetRootFolderFiles(action.resourceId));
}
},
})
}),
catchError((error) => handleSectionError(ctx, 'files', error))
);
}

Expand All @@ -148,7 +149,8 @@ export class FilesState {
ctx.dispatch(new GetRootFolderFiles(action.resourceId));
}
},
})
}),
catchError((error) => handleSectionError(ctx, 'files', error))
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,6 @@
cursor: pointer;
}

.users-list {
height: 30vh;
overflow: auto;
}

.border-divider {
border-bottom: 1px solid var.$grey-2;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
cursor: pointer;
}

.users-list {
height: 30vh;
overflow: auto;
}

.border-divider {
border-bottom: 1px solid var(--grey-2);
}
3 changes: 3 additions & 0 deletions src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,9 @@
"hint": {
"tagSeparators": "Use enter or comma to create a tag.",
"viewOnlyLinksBanner": "You are viewing OSF through a view-only link, which may limit the data you have permission to see."
},
"errorMessages": {
"serverError": "An unexpected error occurred. Please try again later."
}
},
"navigation": {
Expand Down
Loading