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

fix: use of fatal, double error output and vague errors #1455

Merged

Conversation

gotbadger
Copy link
Contributor

@gotbadger gotbadger commented Jan 8, 2024

Description

When bearer.ignore is invalid you would receive an error like.

Error: unexpected end of JSON input
unexpected end of JSON input
exit status 1

This PR:

  • Improves error handling for invalid bearer.ignore files to give more context
  • Fixes issue where the error was printed twice
  • Fixes some cases where errors resulted in a immediate call to fatal that did not flow though the normal framework error handling

New output

Error: ignore file '/My/Path/bearer.ignore' is invalid - unexpected end of JSON input
exit status 1

Checklist

  • I've added test coverage that shows my fix or feature works as expected.
  • I've updated or added documentation if required.
  • I've included usage information in the description if CLI behavior was updated or added.
  • PR title follows Conventional Commits format

@gotbadger gotbadger requested a review from didroe January 8, 2024 12:47
@gotbadger gotbadger merged commit 905306a into main Jan 8, 2024
10 checks passed
@gotbadger gotbadger deleted the fix/improve-error-handling-of-malformed-ignore-files branch January 8, 2024 13:00
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.

None yet

2 participants