Catch AttributeError in case of incorrect session_id

Change-Id: I310e85b96a8afab3dce3330cbb171b97a2410130
Closes-Bug: 1269749
Merge "Catch AttributeError in case of incorrect session_id" into release-0.4