MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / failure

Method failure

lambda/runtime_api_client.go:81–87  ·  view source on GitHub ↗

failure sends the payload to the Runtime API. This marks the function's invoke as a failure. Notes: - The execution of the function process continues, and is billed, until next() is called again! - A Lambda Function continues to be re-used for future invokes even after a failure. If the error is fat

(body io.Reader, contentType string, causeForXRay []byte)

Source from the content-addressed store, hash-verified

79// - A Lambda Function continues to be re-used for future invokes even after a failure.
80// If the error is fatal (panic, unrecoverable state), exit the process immediately after calling failure()
81func (i *invoke) failure(body io.Reader, contentType string, causeForXRay []byte) error {
82 defer i.client.pool.Put(i.payload)
83 defer i.payload.Reset()
84
85 url := i.client.baseURL + i.id + "/error"
86 return i.client.post(url, body, contentType, causeForXRay)
87}
88
89// next connects to the Runtime API and waits for a new invoke Request to be available.
90// Note: After a call to Done() or Error() has been made, a call to next() will complete the in-flight invoke.

Callers 4

TestClientDoneAndErrorFunction · 0.95
TestStatusCodesFunction · 0.95
reportFailureFunction · 0.80

Calls 1

postMethod · 0.80

Tested by 3

TestClientDoneAndErrorFunction · 0.76
TestStatusCodesFunction · 0.76