fix(ui): dont mess up redux if 403 gets thrown

This commit is contained in:
Mary Hipp 2024-07-01 15:09:14 -04:00 committed by Mary Hipp Rogers
parent 57c0fcb93d
commit 977a77f4e6

View File

@ -29,7 +29,8 @@ export const authToastMiddleware: Middleware = () => (next) => (action) => {
const endpointName = parsed.meta?.arg?.endpointName;
if (endpointName === 'getImageDTO') {
// do not show toast if problem is image access
return;
return next(action);
}
const customMessage = parsed.payload.data.detail !== 'Forbidden' ? parsed.payload.data.detail : undefined;