Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

Commit

Permalink
fix(lambda): Process requestContext only if present
Browse files Browse the repository at this point in the history
  • Loading branch information
ashwoods committed Jan 2, 2018
1 parent 8ad07a8 commit 9f56a51
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions raven/contrib/awslambda/__init__.py
Expand Up @@ -64,14 +64,18 @@ def capture(self, *args, **kwargs):
data = kwargs['data']
event = kwargs.get('event', None)
context = kwargs.get('context', None)
user_info = self._get_user_interface(event)
if user_info:
data.update(user_info)

if event:
http_info = self._get_http_interface(event)
user_info = self._get_user_interface(event)
if http_info:
data.update(http_info)
if user_info:
data.update(user_info)

if event and context:
data['extra'] = self._get_extra_data(event, context)

return super(LambdaClient, self).capture(*args, **kwargs)

def build_msg(self, *args, **kwargs):
Expand Down

0 comments on commit 9f56a51

Please sign in to comment.