Skip to content

fix: handle missing errorIndication in StatusInformation#242

Open
saschabuehrle wants to merge 1 commit into
lextudio:mainfrom
saschabuehrle:fix/issue-241
Open

fix: handle missing errorIndication in StatusInformation#242
saschabuehrle wants to merge 1 commit into
lextudio:mainfrom
saschabuehrle:fix/issue-241

Conversation

@saschabuehrle

Copy link
Copy Markdown

Fixes #241

rfc3412.prepare_data_elements can raise a StatusInformation with only sendPduHandle and no errorIndication key (line 875 in rfc3412.py, the else-branch when reportableFlag is false). When cmdgen.process_response_pdu catches this, it does statusInformation["errorIndication"] which throws a KeyError.

Switched both lookups in cmdgen.py to .get("errorIndication", errind.requestTimedOut) so the callback still fires with a sensible error instead of crashing.

-- saschabuehrle

@CLAassistant

Copy link
Copy Markdown

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KeyError: 'errorIndication'

2 participants