0

I have this error in the console:

react_devtools_backend.js:4012 A non-serializable value was detected in an action, in the path: `meta.arg.config.adapter`. Value: ƒ xhrAdapter(config) {
  return new Promise(function dispatchXhrRequest(resolve, reject) {
    var requestData = config.data;
    var requestHeaders = config.headers;
    var responseType = config.resp… 
Take a look at the logic that dispatched this action:  
{type: '[GET] dataGrid/runTask/rejected', payload: undefined, meta: {…}, error: {…}}
error
: 
{name: 'Error', message: 'Request failed with status code 400', stack: 'Error: Request failed with status code 400\n    at …tp://localhost:3000/static/js/bundle.js:208909:7)'}
meta
: 
{arg: {…}, requestId: 'XNHo_e78g2enuXNwLe_pQ', rejectedWithValue: false, requestStatus: 'rejected', aborted: false, …}
payload
: 
undefined
type
: 
"[GET] dataGrid/runTask/rejected"
[[Prototype]]
: 
Object

can anyone tell me where is the problem because the backend works well.

and the part of code that is mentioned is:

 const requestConfig = {
        headers: {
            "Content-Type": "application/x-www-form-urlencoded",
        },
    };

    export const getReportsList = createAsyncThunk(
        '\[GET\], dataGrid/reportsList',
        async (\_) = \ > {
            const response = await getData(ENDPOINTS.all_reports)
            return response.data
        }
    )
NIKUNJ PATEL
  • 2,034
  • 1
  • 7
  • 22

1 Answers1

0

I found out that the problem is related to the headers. I call 2 times the headers so in headers I had the another one! simply after that the error solved.