change(ui): remove random log and duplicates
This commit is contained in:
parent
d6818e0d88
commit
0c9b2cb6d8
2 changed files with 2 additions and 9 deletions
|
|
@ -40,7 +40,7 @@ export default () => (next) => (action) => {
|
|||
});
|
||||
};
|
||||
|
||||
function parseError(e) {
|
||||
export function parseError(e) {
|
||||
try {
|
||||
return [...JSON.parse(e).errors] || [];
|
||||
} catch {
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import { getDateRangeFromValue } from 'App/dateRange';
|
|||
import APIClient from 'App/api_client';
|
||||
import { FETCH_ACCOUNT, UPDATE_JWT } from "Duck/user";
|
||||
import logger from "App/logger";
|
||||
import { parseError } from 'App/api_middleware'
|
||||
|
||||
const name = 'sessions';
|
||||
const FETCH_LIST = new RequestTypes('sessions/FETCH_LIST');
|
||||
|
|
@ -399,14 +400,6 @@ export const fetch =
|
|||
});
|
||||
};
|
||||
|
||||
function parseError(e: any) {
|
||||
try {
|
||||
return [...JSON.parse(e).errors] || [];
|
||||
} catch {
|
||||
return Array.isArray(e) ? e : [e];
|
||||
}
|
||||
}
|
||||
|
||||
// implementing custom middleware-like request to keep the behavior
|
||||
// TODO: move all to mobx
|
||||
export const fetchV2 = (sessionId: string) =>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue