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

chore: add generic error catalog errors for golang Errors #5693

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

PeterSchafer
Copy link
Collaborator

@PeterSchafer PeterSchafer commented Jan 28, 2025

Pull Request Submission Checklist

  • Follows CONTRIBUTING guidelines
  • Includes detailed description of changes
  • Contains risk assessment (Low | Medium | High)
  • Highlights breaking API changes (if applicable)
  • Links to automated tests covering new functionality
  • Includes manual testing instructions (if necessary)
  • Updates relevant GitBook documentation (PR link: ___)

What does this PR do?

This PR introduces a wrapping of golang Errors returned from various places and dependencies in a generic Error Catalog Error. Exceptions are exit code errors and if there is already an Error Catalog Error.

The risk of the change is relatively low, as the changes only focus on decorating errors without altering the content itself

Where should the reviewer start?

decorateError() implements the logic and is integrated in main.go

How should this be manually tested?

Run the command below. which will show an error that tells users to add the missing format parameter.

snyk sbom

@PeterSchafer PeterSchafer requested a review from a team as a code owner January 28, 2025 17:33
Base automatically changed from feat/passing-ts-errors-to-go to main January 28, 2025 17:39
@PeterSchafer PeterSchafer changed the title chore: add generic catalog error for generic golang error chore: add generic error catalog errors for golang Errors Jan 28, 2025
@PeterSchafer PeterSchafer force-pushed the chore/CLI-697_wrap_go_errs branch 2 times, most recently from a371db5 to 323ca7a Compare January 28, 2025 17:46
@PeterSchafer PeterSchafer force-pushed the chore/CLI-697_wrap_go_errs branch from 323ca7a to 95b03a5 Compare January 28, 2025 18:28
@PeterSchafer PeterSchafer merged commit 67da333 into main Jan 28, 2025
7 checks passed
@PeterSchafer PeterSchafer deleted the chore/CLI-697_wrap_go_errs branch January 28, 2025 19:50
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