Skip to content

Commit 1c10357

Browse files
Bump types-requests from 2.31.0.8 to 2.31.0.10 (#716)
* Bump types-requests from 2.31.0.8 to 2.31.0.10 Bumps [types-requests](https://github.com/python/typeshed) from 2.31.0.8 to 2.31.0.10. - [Commits](https://github.com/python/typeshed/commits) --- updated-dependencies: - dependency-name: types-requests dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * Safely access response.status_code --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Graham Beckley <[email protected]>
1 parent 4edc37e commit 1c10357

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

jbi/services/jira.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def get_issue(self, context: ActionContext, issue_key):
238238
try:
239239
return self.client.get_issue(issue_key)
240240
except requests_exceptions.HTTPError as exc:
241-
if exc.response.status_code != 404:
241+
if getattr(exc.response, "status_code", None) != 404:
242242
raise
243243
logger.error(
244244
"Could not read issue %s: %s",

jbi/steps.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def maybe_update_components(
296296
components=candidate_components,
297297
)
298298
except requests_exceptions.HTTPError as exc:
299-
if exc.response.status_code != 400:
299+
if getattr(exc.response, "status_code", None) != 400:
300300
raise
301301
# If `components` is not a valid field on create/update screens,
302302
# then warn developers and ignore the error.
@@ -383,7 +383,7 @@ def sync_whiteboard_labels(
383383
issue_key=context.jira.issue, add=additions, remove=removals
384384
)
385385
except requests_exceptions.HTTPError as exc:
386-
if exc.response.status_code != 400:
386+
if getattr(exc.response, "status_code", None) != 400:
387387
raise
388388
# If `labels` is not a valid field in this project, then warn developers
389389
# and ignore the error.

poetry.lock

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)