ogr icon indicating copy to clipboard operation
ogr copied to clipboard

Silently ignored error

Open mfocko opened this issue 2 years ago • 1 comments

Discovered in: packit/ogr#759 Cause: An exception is raised when querying the users with permissions on a project, if the current user accessing the API doesn't have any permission themselves. However the current implementation checks generic GitHub exception which can lead to catching also other kind of errors, e.g. 50x

https://github.com/packit/ogr/blob/6e3e246a9cdd7e12e546ed096f2eef270b0f52f5/ogr/services/github/project.py#L210-L214

mfocko avatar Dec 15 '22 14:12 mfocko

Actually not an issue, cause it gets wrapped in GithubAPIException automatically, therefore the reason for failed permissions in #759 is unknown.

Corollary

The except block is unreachable, I will remove it tomorrow.

mfocko avatar Jan 12 '23 19:01 mfocko