Skip to content

Commit

Permalink
ENH Preserve session data when reporting an unhandled error
Browse files Browse the repository at this point in the history
Give users a chance to recover by leaving the session open and persisting the input session data.
  • Loading branch information
Stephen Hoover committed Sep 22, 2016
1 parent 82e80fe commit c223bf8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ def lambda_handler(event, context):
is_end=False)
except Exception as err: # NOQA
log.exception('Unhandled exception for event\n%s\n' % str(event))
return reply.build("Sorry, something went wrong. Please try again.")
return reply.build("Sorry, something went wrong. Please try again.",
persist=event['session'].get('attributes', {}),
is_end=False)

0 comments on commit c223bf8

Please sign in to comment.