diff --git a/lambda/invoke_loop.go b/lambda/invoke_loop.go index 527f46fe..b6857f99 100644 --- a/lambda/invoke_loop.go +++ b/lambda/invoke_loop.go @@ -107,7 +107,7 @@ func reportFailure(invoke *invoke, invokeErr *messages.InvokeResponse_Error) err causeForXRay, err := json.Marshal(makeXRayError(invokeErr)) if err != nil { - return fmt.Errorf("unexpected error occured when serializing the function error cause for X-Ray: %v", err) + return fmt.Errorf("unexpected error occurred when serializing the function error cause for X-Ray: %v", err) } if err := invoke.failure(bytes.NewReader(errorPayload), contentTypeJSON, causeForXRay); err != nil { diff --git a/lambdaurl/http_handler.go b/lambdaurl/http_handler.go index 53c5ba54..c4cb807a 100644 --- a/lambdaurl/http_handler.go +++ b/lambdaurl/http_handler.go @@ -133,7 +133,7 @@ func Wrap(handler http.Handler) func(context.Context, *events.LambdaFunctionURLR defer close(ready) defer w.Close() // TODO: recover and CloseWithError the any panic value once the runtime API client supports plumbing fatal errors through the reader //nolint:errcheck - defer responseWriter.Write(nil) // force default status, headers, content type detection, if none occured during the execution of the handler + defer responseWriter.Write(nil) // force default status, headers, content type detection, if none occurred during the execution of the handler handler.ServeHTTP(responseWriter, httpRequest) }() header := <-ready