Skip to content

Commit

Permalink
Merge pull request #1814 from haider-zada/haider_handle_different_res…
Browse files Browse the repository at this point in the history
…ult_structure

handle result structure without body
  • Loading branch information
dherault authored Aug 30, 2024
2 parents f49f10f + 482dc75 commit 526b7fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/lambda/handler-runner/python-runner/invoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def log(self):
'__offline_payload__': result
}

if isinstance(result['body'], bytes):
if hasattr(result, 'body') and isinstance(result['body'], bytes):
data['__offline_payload__']['body'] = base64.b64encode(result['body']).decode('utf-8')
data['isBase64Encoded'] = True

Expand Down

0 comments on commit 526b7fe

Please sign in to comment.