Skip to content

fix: handle 404 gracefully when a governance team does not exist#20

Open
lsmith77 wants to merge 1 commit into
publiccodeyml:mainfrom
lsmith77:in-Team
Open

fix: handle 404 gracefully when a governance team does not exist#20
lsmith77 wants to merge 1 commit into
publiccodeyml:mainfrom
lsmith77:in-Team

Conversation

@lsmith77
Copy link
Copy Markdown

The bot crashes with an unhandled RequestError (404) when calling listMembersInOrg for a team that doesn't exist in the org. This causes every comment on every issue to trigger a failing action run.

The fix follows the same pattern already used in removeLabel in the same file: catch the 404, log a warning, and return false (not a member) instead of throwing. Any other error is still re-thrown. The RequestError type needed for the cast is already imported.

Fixes the failure visible in https://github.com/publiccodeyml/publiccode.yml/acti

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant