I am making a discord bot that uses MySQL and I don’t know if it is the login but I keep getting this
(node:1508) UnhandledPromiseRejectionWarning: TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Authorization"]
at ClientRequest.setHeader (_http_outgoing.js:470:3)
at Snekfetch.set (/rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/snekfetch/3.6.4/node_modules/snekfetch/src/index.js:75:20)
at APIRequest.gen (/rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/APIRequest.js:39:28)
at /rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:59:20
at new Promise (<anonymous>)
at SequentialRequestHandler.execute (/rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:58:12)
at SequentialRequestHandler.handle (/rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:125:10)
at SequentialRequestHandler.push (/rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:48:10)
at /rbd/pnpm-volume/893c9e43-87c3-4198-9a98-22bf2df08a95/node_modules/.registry.npmjs.org/discord.js/11.5.1/node_modules/discord.js/src/client/rest/RESTManager.js:27:15
at new Promise (<anonymous>)
(node:1508) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2)
(node:1508) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
events.js:173
If anyone can tell me what is emitting this error, that would help a lot. My project is private but I do know that this error is emitting from my index.js file or my shard.js file.