Skip to content

fix: parse_errors crashing on null values in errorMessages#2415

Open
star7js wants to merge 3 commits into
pycontribs:mainfrom
star7js:fix/parse-errors-null-messages
Open

fix: parse_errors crashing on null values in errorMessages#2415
star7js wants to merge 3 commits into
pycontribs:mainfrom
star7js:fix/parse-errors-null-messages

Conversation

@star7js

@star7js star7js commented Mar 28, 2026

Copy link
Copy Markdown

Summary

  • parse_errors() crashed with TypeError: sequence item 0: expected str instance, NoneType found when Jira returns {"errorMessages": [null]} in the response
  • Filter out None values when extracting from the errorMessages array
  • Added 2 test cases: null-only and mixed null/string errorMessages

All existing tests continue to pass.

Closes #2351

When Jira returns {"errorMessages": [null]}, parse_errors() includes
the None in the list, causing parse_error_msg() to crash with
TypeError on ", ".join(errors) since None is not a string.

Filter out None values when extracting error messages from the
errorMessages array. Added test cases for null-only and mixed
null/string errorMessages.

Fixes pycontribs#2351
@star7js star7js requested a review from a team as a code owner March 28, 2026 20:54
@star7js star7js requested a review from ssbarnea March 28, 2026 20:54
@star7js star7js changed the title Fix parse_errors crashing on null values in errorMessages fix: parse_errors crashing on null values in errorMessages Mar 28, 2026
@star7js

star7js commented May 7, 2026

Copy link
Copy Markdown
Author

Quick triage bump — I don't have label perms here, so flagging for a maintainer to label whenever convenient. Closes #2351 with tests.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

resilientsession.parse_errors() does not validate error message types

1 participant