Have a very simple POST serverless function that was working perfectly up until this morning. It receives a body in json format. When hitting the function, it immediately returns with an error 415 incorrect media type. I have double checked the content-type header = application/json but it’s not backing down - doesn’t even get into my function.
"message": "Request failed with status code 415",
"name": "Error",
"stack": "Error: Request failed with status code 415\n at createError (/var/task/src/webpack:/node_modules/axios/lib/core/createError.js:16:15)\n at settle (/var/task/src/webpack:/node_modules/axios/lib/core/settle.js:17:12)\n at IncomingMessage.<anonymous> (/var/task/src/webpack:/node_modules/axios/lib/adapters/http.js:260:11)\n at IncomingMessage.emit (events.js:326:22)\n at IncomingMessage.EventEmitter.emit (domain.js:483:12)\n at endReadableNT (_stream_readable.js:1241:12)\n at processTicksAndRejections (internal/process/task_queues.js:84:21)",
"config": {
"url": "https://www.ikhokha.com/_hcms/api/ikshopcallbackv2?draftorderid=gid://shopify/DraftOrder/869843697722",
"method": "post",
"data": "{\"transactionId\":\"test\",\"status\":\"SUCCESS\",\"responseCode\":\"00\",\"responseMessage\":\"Successful\"}",
"headers": {
"Accept": "application/json, text/plain, */*",
"Content-Type": "application/json",
"ik-appid": "---",
"ik-sign": "---",
"User-Agent": "axios/0.21.1",
"Content-Length": 94
},
"transformRequest": [
null
],
"transformResponse": [
null
],
"timeout": 0,
"xsrfCookieName": "XSRF-TOKEN",
"xsrfHeaderName": "X-XSRF-TOKEN",
"maxContentLength": -1,
"maxBodyLength": -1
}
}