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

TypeError: Cannot read property 'error' of undefined on POST

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

Description

## Problem Description
We are seeing the app throw a `TypeError` when any Github event triggers the webhook. The app is running on Kubernetes and deployed with Helm.

### What is actually happening
The app throws a `500` and doesn't enforce any settings defined in the `admin` repo.

### What is the expected behavior
The app returns a `200` and enforces the settings defined in the `admin` repo.

### Error output, if available

```
AggregateError:
TypeError: Cannot read property 'error' of undefined
at /opt/safe-settings/lib/configManager.js:20:18
at async ConfigManager.loadYaml (/opt/safe-settings/lib/configManager.js:19:24)
at async syncAllSettings (/opt/safe-settings/index.js:16:29)
at async Promise.all (index 0)
at async middleware (/opt/safe-settings/node_modules/@octokit/webhooks/dist-node/index.js:355:5)
```

## Context
n/a

### Are you using the hosted instance of probot/settings or running your own?
Running my own.

### If running your own instance, are you using it with github.com or GitHub Enterprise?
github.com.

#### Version of probot/settings
`^12.2.8`

#### Version of GitHub Enterprise
n/a

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.