Can't refresh access token
vuthanhtrung2010 opened this issue · 0 comments
Error refreshing access token: TypeError: Cannot read properties of undefined (reading 'body')
at refreshToken (/home/nghia1611/projects/test-spotify/index.js:30:37)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
/home/nghia1611/projects/test-spotify/node_modules/spotify-web-api-node/src/http-manager.js:71
return callback(_toError(err.response));
^
TypeError: callback is not a function
at /home/nghia1611/projects/test-spotify/node_modules/spotify-web-api-node/src/http-manager.js:71:16
at Request.callback (/home/nghia1611/projects/test-spotify/node_modules/superagent/lib/node/index.js:905:3)
at /home/nghia1611/projects/test-spotify/node_modules/superagent/lib/node/index.js:1127:20
at IncomingMessage. (/home/nghia1611/projects/test-spotify/node_modules/superagent/lib/node/parsers/json.js:22:7)
at Stream.emit (node:events:514:28)
at Unzip. (/home/nghia1611/projects/test-spotify/node_modules/superagent/lib/node/unzip.js:53:12)
at Unzip.emit (node:events:514:28)
at endReadableNT (node:internal/streams/readable:1359:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
Node.js v18.17.1