diff --git a/cmd/localstack/custom_interop.go b/cmd/localstack/custom_interop.go index e9ddb42..dbe4061 100644 --- a/cmd/localstack/custom_interop.go +++ b/cmd/localstack/custom_interop.go @@ -117,12 +117,11 @@ func NewCustomInteropServer(lsOpts *LsOpts, delegate rapidcore.InteropServer, lo var errR map[string]any marshalErr := json.Unmarshal(invokeResp.Body, &errR) - if marshalErr != nil { - log.Fatalln(marshalErr) + isErr := false + if marshalErr == nil { + _, isErr = errR["errorType"] } - _, isErr := errR["errorType"] - if isErr { log.Infoln("Sending to /error") _, err = http.Post(server.upstreamEndpoint+"/invocations/"+invokeR.InvokeId+"/error", "application/json", bytes.NewReader(invokeResp.Body))