postInvocationError method

Future<Response> postInvocationError(
  1. String requestId,
  2. InvocationError err

Post an invocation error to the AWS Lambda Runtime Interface. It takes in an InvocationError and the requestId. The requestId is used to map the error to the execution.


Future<http.Response> postInvocationError(
    String requestId, InvocationError err) async {
  return await
    body: jsonEncode(err),
    headers: {'Content-type': 'application/json'},