mirror of
https://github.com/elyby/accounts-frontend.git
synced 2024-11-07 08:39:03 +05:30
23 lines
555 B
TypeScript
23 lines
555 B
TypeScript
import request from 'app/services/request';
|
|
import logger from 'app/services/logger';
|
|
import { Store } from 'app/reducers';
|
|
import { History } from 'history';
|
|
|
|
import dispatchBsod, { inject } from './dispatchBsod';
|
|
import BsodMiddleware from './BsodMiddleware';
|
|
|
|
export default function factory({
|
|
store,
|
|
history,
|
|
stopLoading,
|
|
}: {
|
|
store: Store;
|
|
history: History<any>;
|
|
stopLoading: () => void;
|
|
}) {
|
|
inject({ store, history, stopLoading });
|
|
|
|
// do bsod for 500/404 errors
|
|
request.addMiddleware(new BsodMiddleware(dispatchBsod, logger));
|
|
}
|