Skip to content

Commit

Permalink
Throw exception on Lambda function error (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
musketyr authored Nov 29, 2022
1 parent 0bb457b commit 3a76d22
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ private Object invokeFunction(MethodInvocationContext<Object, Object> context, s

InvokeResponse response = service.invoke(request);

if (response.statusCode() >= 400) {
if (response.statusCode() >= 400 || StringUtils.isNotEmpty(response.functionError())) {
throw new LambdaClientException(response);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ private Object invokeFunction(MethodInvocationContext<Object, Object> context, A

InvokeResult response = service.invoke(request);

if (response.getStatusCode() >= 400) {
if (response.getStatusCode() >= 400 || StringUtils.isNotEmpty(response.getFunctionError())) {
throw new LambdaClientException(response);
}

Expand Down

0 comments on commit 3a76d22

Please sign in to comment.