From: Stephen Smith Date: Mon, 21 Aug 2023 16:35:59 +0000 (-0400) Subject: 20219: Suppress error toast when process logs fail to load due to 404 X-Git-Url: https://git.arvados.org/arvados.git/commitdiff_plain/5a0fee4d900804c50149cc87376e0bc65a390985 20219: Suppress error toast when process logs fail to load due to 404 Arvados-DCO-1.1-Signed-off-by: Stephen Smith --- diff --git a/src/store/process-logs-panel/process-logs-panel-actions.ts b/src/store/process-logs-panel/process-logs-panel-actions.ts index 844f01542b..87a2fa12aa 100644 --- a/src/store/process-logs-panel/process-logs-panel-actions.ts +++ b/src/store/process-logs-panel/process-logs-panel-actions.ts @@ -61,7 +61,10 @@ export const initProcessLogsPanel = (processUuid: string) => // On error, populate empty state to allow polling to start const initialState = createInitialLogPanelState([], []); dispatch(processLogsPanelActions.INIT_PROCESS_LOGS_PANEL(initialState)); - dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not load process logs', hideDuration: 2000, kind: SnackbarKind.ERROR })); + // Only show toast on errors other than 404 since 404 is expected when logs do not exist yet + if (e.status !== 404) { + dispatch(snackbarActions.OPEN_SNACKBAR({ message: 'Could not load process logs', hideDuration: 2000, kind: SnackbarKind.ERROR })); + } } };