Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load-error Error: Request failed with status code 400 #143

Open
lmj0011 opened this issue May 15, 2017 · 3 comments
Open

load-error Error: Request failed with status code 400 #143

lmj0011 opened this issue May 15, 2017 · 3 comments

Comments

@lmj0011
Copy link

lmj0011 commented May 15, 2017

I just updated to v1.6.0, and everything seems fine expect for this error:

load-error { Error: Request failed with status code 400
    at createError (/home/forge/example.dev.bid/adonuxt/node_modules/axios/lib/core/createError.js:15:15)
    at settle (/home/forge/example.dev.bid/adonuxt/node_modules/axios/lib/core/settle.js:18:12)
    at IncomingMessage.handleStreamEnd (/home/forge/example.dev.bid/adonuxt/node_modules/axios/lib/adapters/http.js:186:11)
    at emitNone (events.js:91:20)
    at IncomingMessage.emit (events.js:188:7)
    at endReadableNT (_stream_readable.js:975:12)
    at _combinedTickCallback (internal/process/next_tick.js:80:11)
    at process._tickCallback (internal/process/next_tick.js:104:9)
  config: 
   { adapter: [Function: httpAdapter],
     transformRequest: { '0': [Function: transformRequest] },
     transformResponse: { '0': [Function: transformResponse] },
     timeout: 0,
     xsrfCookieName: 'XSRF-TOKEN',
     xsrfHeaderName: 'X-XSRF-TOKEN',
     maxContentLength: -1,
     validateStatus: [Function: validateStatus],
     headers: 
      { Accept: 'application/json, text/plain, */*',
        'User-Agent': 'axios/0.15.3' },
     method: 'get',
     params: { sort: '', page: 1, per_page: 10 },
     url: '/api/v1/instances',
     data: undefined },
  response: 
   { status: 400,
     statusText: 'Bad Request',
     headers: 
      { server: 'nginx/1.11.2',
        date: 'Mon, 15 May 2017 12:11:12 GMT',
        'content-type': 'text/html; charset=utf-8',
        'content-length': '173',
        connection: 'close' },
     config: 
      { adapter: [Function: httpAdapter],
        transformRequest: [Object],
        transformResponse: [Object],
        timeout: 0,
        xsrfCookieName: 'XSRF-TOKEN',
        xsrfHeaderName: 'X-XSRF-TOKEN',
        maxContentLength: -1,
        validateStatus: [Function: validateStatus],
        headers: [Object],
        method: 'get',
        params: [Object],
        url: '/api/v1/instances',
        data: undefined },
     request: 
      Writable {
        _writableState: [Object],
        writable: true,
        domain: null,
        _events: [Object],
        _eventsCount: 2,
        _maxListeners: undefined,
        _options: [Object],
        _redirectCount: 1,
        _onNativeResponse: [Function],
        _currentRequest: [Object],
        _currentUrl: 'http:index.html',
        _currentResponse: [Object] },
     data: '<html>\r\n<head><title>400 Bad Request</title></head>\r\n<body bgcolor="white">\r\n<center><h1>400 Bad Request</h1></center>\r\n<hr><center>nginx/1.11.2</center>\r\n</body>\r\n</html>\r\n' } }

My server is catching this error on every page refresh. The front-end doesn't produce an error in the console nor does the table data appear affected.

/api/v1/instances is the api call that the vuetable is set to call

For now, I'm falling back to the fork I was using based on vuetable-2@1.3.0, which doesn't produce this error.
https://github.com/lmj0011/vuetable-2#adonuxt

@ratiw
Copy link
Owner

ratiw commented May 15, 2017

@lmj0011 Check you server side. This is the error dump when vuetable:load-error event occurred which means the api call was unsuccessful.

@lmj0011
Copy link
Author

lmj0011 commented May 15, 2017

@ratiw

Exactly when does the vuetable make its first attempt to fetch the data from the api url?

Because I end up getting a successful call during page load.

@ratiw
Copy link
Owner

ratiw commented May 20, 2017

@lmj0011 It first attempts to load the data during the created hook unless load-on-start prop is set to false.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants