I have followed a tutorial that centralizes React app error management with Redux in an errorReducer file:
errorReducer.js
impor