You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Promise
#59
I'm using the middleware but when I call the endpoint I receive this exececption
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Promise
at Function.byteLength (buffer.js:728:11)
at chunkLength (/Users/etiennedewever/work/Polyconseil/coviflex/coviflex-api/node_modules/compression/index.js:245:14)
at ServerResponse.end (/Users/etiennedewever/work/Polyconseil/coviflex/coviflex-api/node_modules/compression/index.js:100:20)
This is due because it sending a promise to res.end
It just need to be await first then send
The text was updated successfully, but these errors were encountered:
Hi,
I'm using the middleware but when I call the endpoint I receive this exececption
TypeError [ERR_INVALID_ARG_TYPE]: The "string" argument must be of type string or an instance of Buffer or ArrayBuffer. Received an instance of Promise
at Function.byteLength (buffer.js:728:11)
at chunkLength (/Users/etiennedewever/work/Polyconseil/coviflex/coviflex-api/node_modules/compression/index.js:245:14)
at ServerResponse.end (/Users/etiennedewever/work/Polyconseil/coviflex/coviflex-api/node_modules/compression/index.js:100:20)
This is due because it sending a promise to res.end
It just need to be await first then send
The text was updated successfully, but these errors were encountered: