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: error catalog messages for monitor commands #5630

Merged
merged 1 commit into from
Dec 18, 2024

Conversation

CatalinSnyk
Copy link
Contributor

@CatalinSnyk CatalinSnyk commented Dec 16, 2024

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?

Following the previous changes to the snyk test and snyk code test of returning an error message from the Error Catalog for unsuccessful network requests, this PR adds the same functionality to the snyk monitor and snyk container monitor commands.

Where should the reviewer start?

How should this be manually tested?

  • Ensure a clean build of the CLI
  • Clear you configuration using snyk config clear to ensure further request towards Snyk services will fail with a 401 unauthorized response code
  • Running snyk monitor or snyk container monitor <image> (eg. image: alpine or any available Docker image) should return a nicely formatted error message from the Error Catalog. You can also include the -d debug flag and look for the analytics payload sent, that should contain the same ID for the error and the status code for it.

Ticket: CLI-644

@CatalinSnyk CatalinSnyk requested a review from a team as a code owner December 16, 2024 17:32
@CatalinSnyk CatalinSnyk force-pushed the fix/improved-error-messages-monitor-command branch 2 times, most recently from 5cd6f32 to 9d7cd74 Compare December 18, 2024 07:42
@CatalinSnyk CatalinSnyk force-pushed the fix/improved-error-messages-monitor-command branch from 9d7cd74 to c3881fd Compare December 18, 2024 11:19
@CatalinSnyk CatalinSnyk force-pushed the fix/improved-error-messages-monitor-command branch from c3881fd to 4e58601 Compare December 18, 2024 12:28
@PeterSchafer PeterSchafer merged commit eeb3ee0 into main Dec 18, 2024
7 checks passed
@PeterSchafer PeterSchafer deleted the fix/improved-error-messages-monitor-command branch December 18, 2024 13:19
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