Skip to content

Conversation

@CatalinSnyk
Copy link
Contributor

@CatalinSnyk CatalinSnyk commented Nov 15, 2024

  • Adds a new method to the NetworkAccess interface for registering an error handler
  • Implements the handler for 401 unauthorized status code

Ticket: CLI-575

@CatalinSnyk CatalinSnyk force-pushed the feat/handle-non-2xx-response-CLI-575 branch 2 times, most recently from 2c1fb80 to 32078b4 Compare November 27, 2024 18:40
Previously, the call for fetching the SAST enabled setting from the Snyk API was done in the initialization of the Code workflow. If the call failed because of an error (be it an auth error or any other kind), the workflow would still return an error to enable Snyk Code. To fix this, the network call has been moved in the entrypoint for the workflow, and if an error happens during the request, it is returned back from the workflow.
Changed the DefaultValueFunction type to return an error which can be retrieved using the new GetE getter. Related: CLI-608, CLI-611
@PeterSchafer PeterSchafer force-pushed the feat/handle-non-2xx-response-CLI-575 branch from 1f378b6 to 2692805 Compare December 4, 2024 07:59
@CatalinSnyk CatalinSnyk marked this pull request as ready for review December 5, 2024 09:26
@CatalinSnyk CatalinSnyk requested review from a team as code owners December 5, 2024 09:26
@PeterSchafer
Copy link
Contributor

Looks really great, Thank you! I only left some minor comments.

@CatalinSnyk CatalinSnyk merged commit 56df2ca into main Dec 9, 2024
9 checks passed
@CatalinSnyk CatalinSnyk deleted the feat/handle-non-2xx-response-CLI-575 branch December 9, 2024 12:43
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.

3 participants