I am getting this error after using api call. I am trying to fetch data from myjson api. Am i doing something wrong with the current implementation or Is there any better way to call the same api.
import { createAction, handleActions } from 'redux-actions'
import { PLUGIN_NAME, STORE_MOUNT_POINT } from '../constants'
import { Epic,ofType } from 'redux-observable'
import { Store } from '../Store'
import { defer, of } from 'rxjs'
import { mergeMap } from 'rxjs/operators'
import { ajax } from '../util'
const fetchReportTemplate$: Epic<Store.IFSA> = (action$, state$) =>
action$.ofType(startFetchReportsTemplate.toString(),
return ajax(
{
url: 'https://api.myjson.com/bins/15dcd9',
body: ''
}
)
).map(({ response: { data } }) => {
return of(clearAllHttpErrors(), receiveReportsTemplateRows(data))
})