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

feat: expose syntax and type errors #424

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

nieomylnieja
Copy link

@nieomylnieja nieomylnieja commented Feb 1, 2024

Before submitting your PR, please confirm the following.

  • Describe the purpose for which you created this PR.
    Solves Return structured errors #423
  • Create test code that corresponds to the modification
    Unit tested yaml.AsTokenScopedError, tests added to error_test.go

@codecov-commenter
Copy link

codecov-commenter commented Feb 1, 2024

Codecov Report

Merging #424 (1ee5296) into master (4653a1b) will increase coverage by 0.07%.
The diff coverage is 91.66%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #424      +/-   ##
==========================================
+ Coverage   76.02%   76.10%   +0.07%     
==========================================
  Files          13       13              
  Lines        4692     4716      +24     
==========================================
+ Hits         3567     3589      +22     
- Misses        866      868       +2     
  Partials      259      259              

@nieomylnieja
Copy link
Author

Coming to think about, TypeError is equally useful as SyntaxError.
Maybe we could simply export the whole package? Would you consider that @goccy?
Then we wouldn't need to implement any As... extractor functions, anyone interested in reading these errors could simply do errors.As on their own.

@nieomylnieja nieomylnieja changed the title feat: expose syntax errors feat: expose syntax and type errors Feb 3, 2024
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