- We need to know your netlify site name. Example:
gifted-antelope-58b104.netlify.app
rewardiply
I am having a new error when I hit one of my lambda service.
◈ Function Message has returned an error: Cannot read properties of undefined (reading 'pipe')
TypeError: Cannot read properties of undefined (reading 'pipe')
at runFunctionsProxy (file:///opt/homebrew/lib/node_modules/netlify-cli/src/lib/functions/local-proxy.js:39:25)
at Module.invokeFunction (file:///opt/homebrew/lib/node_modules/netlify-cli/src/lib/functions/runtimes/go/index.js:43:30)
at NetlifyFunction.invoke (file:///opt/homebrew/lib/node_modules/netlify-cli/src/lib/functions/netlify-function.js:182:47)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async handler (file:///opt/homebrew/lib/node_modules/netlify-cli/src/lib/functions/server.js:169:39)
Response with status 500 in 197 ms.
The lambda is written in go, and comment out to super duper simple:
package main
import (
// "bytes"
"database/sql"
// "encoding/json"
"errors"
"fmt"
// "image"
// "io"
"regexp"
"time"
// "github.com/google/uuid"
// "github.com/grokify/go-awslambda"
"github.com/aws/aws-lambda-go/events"
"github.com/aws/aws-lambda-go/lambda"
// "github.com/shrinerp/hokr/internals/cache"
// "github.com/shrinerp/hokr/internals/shared"
)
func handler(request events.APIGatewayProxyRequest) (*events.APIGatewayProxyResponse, error) {
var txn string
action, ok := request.Headers["view"]
if !ok {
fmt.Println("List View from the headers")
}
switch action {
case "saveimage":
case "savestoreimage":
txn = "I LOVE CATS"
case "postsave":
txn = "MEOW"
}
// Your server-side functionality
return &events.APIGatewayProxyResponse{
StatusCode: 200,
Headers: map[string]string{"Content-Type": "application/json"},
Body: txn,
}, nil
}
func main() {
// Make the handler available for Remote Procedure Call
lambda.Start(handler)
}
This was working, and now it is not working, what do I do?