Skip to content

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

Merged
bfabio merged 3 commits into
publiccodeyml:mainfrom
lsmith77:in-Team
Jun 11, 2026
Merged

fix: handle 404 gracefully when a governance team does not exist#20
bfabio merged 3 commits into
publiccodeyml:mainfrom
lsmith77:in-Team

Conversation

@lsmith77

Copy link
Copy Markdown
Contributor

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

Comment thread src/bot.ts Outdated
bfabio and others added 2 commits June 11, 2026 20:16
The applied suggestion changed only the source. The action runs the
committed bundle, which still logged at warn level.
@bfabio

bfabio commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

Thanks @lsmith77!

@bfabio bfabio merged commit 042f74e into publiccodeyml:main Jun 11, 2026
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.

2 participants