View source: R/error-handling.R
post_lambda_error | R Documentation |
According to the
AWS Lambda
Developer Guide an error posted to the initialisation or invocation error
endpoints must be of content type application/vnd.aws.lambda.error+json
and of the format:
{ "errorMessage": "...", "errorType": "...", "stackTrace": [], }
Here the errorMessage
and errorType
are strings, with the stackTrace
a list of strings.
This function accepts an error as caught by tryCatch
and
posts it to the given endpoint, ensuring that the correct formatting is
adhered to. This function does not stop the runtime as in the case of
invocation errors it's desirable to continue.
The stacktrace is not currently reported. This functionality is yet to be implemented. See the GitHub issue for more details.
post_lambda_error(e, endpoint)
e |
an error as caught by |
endpoint |
where to |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.