Skip to content

fix: show contextual errors for failed GitHub package.json scans#73

Merged
43081j merged 1 commit into
e18e:mainfrom
t128n:fix/contextual-github-errors
May 25, 2026
Merged

fix: show contextual errors for failed GitHub package.json scans#73
43081j merged 1 commit into
e18e:mainfrom
t128n:fix/contextual-github-errors

Conversation

@t128n
Copy link
Copy Markdown
Contributor

@t128n t128n commented May 25, 2026

Linked issue

Resolves #70

Context

GitHub scans previously returned an empty string when no package.json could be resolved. That value was then parsed as JSON, causing the UI to report File was not valid JSON. even though no file had been found.

Description

This PR adds two error modes that previously produced the same validation error:

Scenario Message
No package.json can be found in the GitHub repository or selected path package.json was not found in this GitHub repository or selected path.
A package.json is found but contains malformed JSON package.json was found in this GitHub repository or selected path, but was not valid JSON.

Before/After

Scenario URL Prod PR
package.json not found replacements.fyi/package-json?owner=t128n&repo=not-found image image
Invalid package.json replacements.fyi/package-json?owner=t128n&repo=invalid-package-json image image

@43081j 43081j merged commit 9e7c71e into e18e:main May 25, 2026
3 checks passed
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.

Improve error message when no package.json is found during a GitHub scan

2 participants