Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve error message when unable to resolve GITHUB_EVENT_PATH #51

Merged
merged 1 commit into from
Jan 13, 2025

Conversation

lencioni
Copy link
Contributor

The error message here was a bit cryptic:

Error: Cannot find module '/path/to/some/file.json'
Require stack:
- /e2e/node_modules/happo-e2e/src/resolveEnvironment.js
...

I want to make it easier for people to troubleshoot this on their own. I think we can try/catch the require and provide a clearer error message that helps people understand that something may be up with the GITHUB_EVENT_PATH environment variable.

@lencioni lencioni requested a review from trotzig January 10, 2025 20:30
The error message here was a bit cryptic:

```
Error: Cannot find module '/path/to/some/file.json'
Require stack:
- /e2e/node_modules/happo-e2e/src/resolveEnvironment.js
...
```

I want to make it easier for people to troubleshoot this on their own. I
think we can try/catch the require and provide a clearer error message
that helps people understand that something may be up with the
GITHUB_EVENT_PATH environment variable.
@lencioni lencioni merged commit 3cbb542 into main Jan 13, 2025
5 checks passed
@lencioni lencioni deleted the resolve-env-error branch January 13, 2025 14:20
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