Update request (PUT) timeout on Sequelize with Axios

Asked
Active3 hr before
Viewed126 times

8 Answers

axiosrequestupdate
90%

OKay, I've found the solution. The request sent to the backend didn't have a password change, and that returned a try from bcrypt to crypt an empty string. I solved it by handling if req.body.password is undefined.,Connect and share knowledge within a single location that is structured and easy to search.,Please be sure to answer the question. Provide details and share your research!

Pretag
 Pretag team - issue, fix, solve, resolve
88%

Pretag
 Pretag team - issue, fix, solve, resolve
72%

Published Aug 21, 2018, Last Updated May 24, 2019 ,Add parameters to GET requests,This Node.js example queries the Dog API to retrieve a list of all the dogs breeds, using axios.get(), and it counts them:

npm install axios
load more v
65%

If you’re making http requests using the axios library on a browser or in a node app, do make sure that you have a timeout set. The default timeout is set to 0 which indicates no timeout. With that default value, any remote end can keep us waiting for the requested resource for an indefinite period. With limited resources at hand, we really wouldn’t like that to happen. Let’s set a timeout instead.,We are printing out the error code, error message and the stack trace. It looks something like this:,If the request was to succeed, it would have printed out the returned response data. But since we rigged it to fail, it would reach the catch block and we would have an error in our hand.

We are printing out the error code, error message and the stack trace. It looks something like this:

ECONNABORTEDtimeout of 2 ms exceededError: timeout of 2 ms exceeded at createError(/Users/masnun / Projects / medium / node_modules / axios / lib / core / createError.js: 16: 15) at Timeout.handleRequestTimeout(/Users/masnun / Projects / medium / node_modules / axios / lib / adapters / http.js: 252: 16) at listOnTimeout(timers.js: 324: 15) at processTimers(timers.js: 268: 5)
75%

The writing was over before I knew it, and we've sold way more copies than I expected! Plus, the compliments from my peers have been really amazing.",Request a Site Feature,Share your knowledge with others, earn money, and help people with their career

Pretag
 Pretag team - issue, fix, solve, resolve
40%

Axios DELETE request: delete a Tutorial, delete all Tutorials,Axios PUT request: update an existing Tutorial,Axios GET request: get all Tutorials, get Tutorial by Id, find Tutorial by title

Pretag
 Pretag team - issue, fix, solve, resolve
22%

Pretag
 Pretag team - issue, fix, solve, resolve
60%

I've been using axios a lot in my web application. Everything has been working just fine in most cases. Today, I've got a new demand in my application using axios, but I can't get it working.,I am creating the possibility to import data to my application. The user uploads a .csv file to my server, and with axios I am calling a method in my controller to process data.,There is one more thing, I don't know why, but I was only able to test it after publishing the application to IIS. The test does not work when debbuging the application.

axios({
      method: 'post',
      url: '/user',
      timeout: 180000, // Let's say you want to wait at least 180 seconds
      data: {
         id: '1234',
      }
   })
   .then(function(response) {
      console.log(response);
   })
   .catch(function(error) {
      console.log(error);
   });
load more v

Other "axios-request" queries related to "Update request (PUT) timeout on Sequelize with Axios"