Relax 404 condition in `Requester` exception handling (#3299)
When using the `Repository.get_branch` method to retrieve a branch that does not exist in the repository, the error message returned is "branch not found". This message does not satisfy the original condition `lc_message == "not found"`, which results in the 404 error not being handled as intended. In this case, `GithubException.GithubException` is returned instead of `GithubException.UnknownObjectException`. This PR updates the condition to check whether the message contains either "not found" or "no object found", allowing for more flexible and accurate error handling. --------- Co-authored-by: Enrico Minack <github@enrico.minack.dev>
J
Jakub Smolar committed
e7110bf41038ba0433bc04a048c73a8ecd26a32f
Parent: 95f015c
Committed by GitHub <noreply@github.com>
on 7/30/2025, 4:36:14 PM