github-community-projects / github-community-projects/safe-settings

Error Handling Issue When Suborg Level Parameters Reference Non-Existent Teams

Open
#675 1 comment 0 reactions 0 assignees View on GitHub
bug
Dominant language
JavaScript
Stars
921
Forks
226
Avg merge
18h 3m
Merged PRs (30d)
14

Description

When changing a parameter at the suborg level, such as `suborgteams`, to a non-existent team, the system returns an unexpected value.
```
# List of repos that belong to the suborg
suborgrepos:
- test-repos*
# You can use Glob patterns

suborgteams:
- test-team
```
![image](https://github.com/user-attachments/assets/a20a0fe5-724c-4859-a318-07b0afa9705d)

The pod logs indicate an `HttpError: Not Found` error, which is logged as:
```
{"level":50,"time":1725518921172,"pid":25,"hostname":"safe-settings-c687bc859-x9c5d","name":"probot","name":"probot","name":"event","id":"e0970a60-6b52-11ef-9f7d-55142efd27bc","msg":"NOPCOMMAND {\"type\":\"ERROR\",\"plugin\":\"getSubOrgConfigs\",\"repo\":\"safe-settings\",\"endpoint\":\"\",\"body\":\"\",\"action\":{\"msg\":\"HttpError: Not Found\",\"additions\":null,\"modifications\":null,\"deletions\":null}}"}
```

We used release 2.1.10, but the issue also occurs in versions 2.1.11 and 2.1.12-rc.1.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.