I have been trying to port my gatsby blog from gatsby cloud to netlify.
I have one gatsby function - a contact form with sendgrid.
the site builds perfectly.
netlify says I have one function running (some sort of netlify wrapper around the gastby __api/from function)
The function was working fine on gatsby cloud.
To simplify debugging - i commented out the original code and simply went with the simplest function (from gastby blog) :
export default function handler(req, res) {
res.status(200).json(“testing”)
}
I cannot understand what could be undefined in that.
my site is: sage-tulumba-315502
I also tried hitting the function at https://normfrenette.com/api/form with insomnia. I get the same error as through the contact form in the blog - namely:
{
“errorType”: “TypeError”,
“errorMessage”: “Cannot read properties of undefined (reading ‘100’)”,
“trace”: [
“TypeError: Cannot read properties of undefined (reading ‘100’)”,
" at forEachCode (/var/task/node_modules/http-errors/index.js:261:45)“,
" at Array.forEach ()”,
" at populateConstructorExports (/var/task/node_modules/http-errors/index.js:259:9)“,
" at Object. (/var/task/node_modules/http-errors/index.js:31:1)”,
" at Module._compile (node:internal/modules/cjs/loader:1256:14)“,
" at Module._extensions…js (node:internal/modules/cjs/loader:1310:10)”,
" at Module.load (node:internal/modules/cjs/loader:1119:32)“,
" at Module._load (node:internal/modules/cjs/loader:960:12)”,
" at Module.require (node:internal/modules/cjs/loader:1143:19)“,
" at require (node:internal/modules/cjs/helpers:121:18)”
]
}
Please help. I have a live blog but no working contact form.