Skip to content

Commit 4e88c54

Browse files
committed
Make CI fail on broken invokes
1 parent 7dc7dfe commit 4e88c54

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

.github/workflows/deploy-examples.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,15 @@ jobs:
119119
echo "All Response Headers:"
120120
jq -r '.ResponseMetadata.HTTPHeaders' /tmp/invoke_response.json || echo "No HTTPHeaders found"
121121
122+
# Check for function errors
123+
FUNCTION_ERROR=$(jq -r '.FunctionError // empty' /tmp/invoke_response.json)
124+
if [ -n "$FUNCTION_ERROR" ]; then
125+
echo "ERROR: Lambda function failed with error: $FUNCTION_ERROR"
126+
echo "Function response:"
127+
cat /tmp/response.json
128+
exit 1
129+
fi
130+
122131
# Extract invocation ID from response headers
123132
INVOCATION_ID=$(jq -r '.ResponseMetadata.HTTPHeaders["x-amzn-invocation-id"] // empty' /tmp/invoke_response.json)
124133
if [ -n "$INVOCATION_ID" ]; then

0 commit comments

Comments
 (0)