The full error from express backend:
ErrorHandler MoralisError [Moralis SDK Core Error]: [C0006] Request failed, Not Found(404): Unknown error (no error info returned from API)
at RequestController.makeError (/usr/src/app/node_modules/@moralisweb3/common-core/src/controllers/RequestController/RequestController.ts:75:14)
at RequestController.<anonymous> (/usr/src/app/node_modules/@moralisweb3/common-core/src/controllers/RequestController/RequestController.ts:56:26)
at step (/usr/src/app/node_modules/@moralisweb3/common-core/lib/controllers/RequestController/RequestController.js:44:23)
at Object.throw (/usr/src/app/node_modules/@moralisweb3/common-core/lib/controllers/RequestController/RequestController.js:25:53)
at rejected (/usr/src/app/node_modules/@moralisweb3/common-core/lib/controllers/RequestController/RequestController.js:17:65)
at processTicksAndRejections (node:internal/process/task_queues:96:5) {
isMoralisError: true,
code: 'C0006',
details: {
status: 404,
response: {
status: 404,
statusText: 'Not Found',
headers: [AxiosHeaders],
config: [Object],
request: [ClientRequest],
data: [Object]
}
},
[cause]: AxiosError: Request failed with status code 404
at settle (/usr/src/app/node_modules/axios/lib/core/settle.js:19:12)
at IncomingMessage.handleStreamEnd (/usr/src/app/node_modules/axios/lib/adapters/http.js:512:11)
at IncomingMessage.emit (node:events:525:35)
at IncomingMessage.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1358:12)
at processTicksAndRejections (node:internal/process/task_queues:83:21) {
code: 'ERR_BAD_REQUEST',
config: {
transitional: [Object],
adapter: [Array],
transformRequest: [Array],
transformResponse: [Array],
timeout: 20000,
xsrfCookieName: 'XSRF-TOKEN',
xsrfHeaderName: 'X-XSRF-TOKEN',
maxContentLength: Infinity,
maxBodyLength: Infinity,
env: [Object],
validateStatus: [Function: validateStatus],
headers: [AxiosHeaders],
url: 'http://localhost:1337/server//users',
method: 'post',
data: '{"authData":{"moralis":{"id":"0x3393b5d1e9ecb00d866a3ef6e468c2915db175bfb5b54281109b4156eb8296bb","authId":"HPUTPW83vKpaMYMuk","message":"mydomain.com wants you to sign in with your Ethereum account:\\n0x<MY_WALLET_ADDRESS>\\n\\nPlease sign this message to confirm your identity.\\n\\nURI: https://mydomain.com\\nVersion: 1\\nChain ID: 1\\nNonce: cEYoTrTZEFGzgdCfE\\nIssued At: 2023-01-16T18:43:10.825Z\\nExpiration Time: 2024-01-01T00:00:00.000Z","signature":"0x8aa047453a79e4eb46323b2a933f551c6b43659072829279ffe78f366d9b12b75a9f42cceb19441de21ea266aaeec843b9501561322329472e7933d08e6a8cae1c","network":"evm"}}}'
},
request: ClientRequest {
_events: [Object: null prototype],
_eventsCount: 7,
_maxListeners: undefined,
outputData: [],
outputSize: 0,
writable: true,
destroyed: false,
_last: true,
chunkedEncoding: false,
shouldKeepAlive: false,
maxRequestsOnConnectionReached: false,
_defaultKeepAlive: true,
useChunkedEncodingByDefault: true,
sendDate: false,
_removedConnection: false,
_removedContLen: false,
_removedTE: false,
strictContentLength: false,
_contentLength: '632',
_hasBody: true,
_trailer: '',
finished: true,
_headerSent: true,
_closed: false,
socket: [Socket],
_header: 'POST /server//users HTTP/1.1\r\n' +
'Accept: application/json, text/plain, */*\r\n' +
'Content-Type: application/json\r\n' +
'X-Parse-Master-Key: replace_me\r\n' +
'X-Parse-Application-Id: 65ac0f481e82acec09d6fa74b66265bb2c727f95074e44bd1e10afbe3ec1dddc\r\n' +
'User-Agent: axios/1.2.2\r\n' +
'Content-Length: 632\r\n' +
'Accept-Encoding: gzip, compress, deflate, br\r\n' +
'Host: localhost:1337\r\n' +
'Connection: close\r\n' +
'\r\n',
_keepAliveTimeout: 0,
_onPendingData: [Function: nop],
agent: [Agent],
socketPath: undefined,
method: 'POST',
maxHeaderSize: undefined,
insecureHTTPParser: undefined,
path: '/server//users',
_ended: true,
res: [IncomingMessage],
aborted: false,
timeoutCb: null,
upgradeOrConnect: false,
parser: null,
maxHeadersCount: null,
reusedSocket: false,
host: 'localhost',
protocol: 'http:',
_redirectable: [Writable],
[Symbol(kCapture)]: false,
[Symbol(kBytesWritten)]: 0,
[Symbol(kEndCalled)]: true,
[Symbol(kNeedDrain)]: false,
[Symbol(corked)]: 0,
[Symbol(kOutHeaders)]: [Object: null prototype],
[Symbol(kUniqueHeaders)]: null
},
response: {
status: 404,
statusText: 'Not Found',
headers: [AxiosHeaders],
config: [Object],
request: [ClientRequest],
data: [Object]
}
}
}
I noticed that http://localhost:1337/server//users
URL have a extra /
between host and endpoint, but already try to change code, but problem persist