Skip to content

Commit

Permalink
Handle key error for now
Browse files Browse the repository at this point in the history
  • Loading branch information
trent-codecov committed Aug 31, 2023
1 parent 34540e4 commit 4c3de87
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion services/comparison/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ async def get_behind_by(self):
),
)
return None

except KeyError:
log.warning(

Check warning on line 186 in services/comparison/__init__.py

View check run for this annotation

Codecov / codecov/patch

services/comparison/__init__.py#L185-L186

Added lines #L185 - L186 were not covered by tests
"Error fetching base branch from Git provider",
extra=dict(
branch=branch_to_get,
),
)
return None

Check warning on line 192 in services/comparison/__init__.py

View check run for this annotation

Codecov / codecov/patch

services/comparison/__init__.py#L192

Added line #L192 was not covered by tests
self._branch = branch_response

distance = await self.repository_service.get_distance_in_commits(
Expand Down

0 comments on commit 4c3de87

Please sign in to comment.