fix(compute): clarify fastly.toml error message when file not found #1556
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add "file not found" to the
ErrReadingManifesterror message to make it clearer that the file doesn't exist, rather than a parsing or permission error.Change summary
The current error message "error reading fastly.toml" is somewhat ambiguous and doesn't clearly indicate whether the file is missing or has parsing errors. The remediation text was present but it still seems easy to misinterpret the actual problem (as proven by it managing to throw both me, Claude and ChatGPT off 😅).
This change adds ": file not found" to the error message to make it even more apparent that the file doesn't exist.
Before:
ERROR: error reading fastly.toml. Ensure the Fastly CLI is being run within a directory containing a fastly.toml
file...
After:
ERROR: error reading fastly.toml: file not found. Ensure the Fastly CLI is being run within a directory containing
a fastly.toml file...
All Submissions:
the same update/change?
Changes to Core Features:
User Impact
fastly.tomlfile is missing.