The following simple codes got: Error executing Gatsby Function. It works fine on my local environment. Could you anyone point if there are simple errors? Thanks!
import { GatsbyFunctionRequest, GatsbyFunctionResponse } from "gatsby"
export default async function handler(
req: GatsbyFunctionRequest,
res: GatsbyFunctionResponse
): Promise<void> {
res.json(req.headers)
return Promise.resolve()
}