Skip to content

v20260223.100453

@acke acke tagged this 23 Feb 10:04
Addresses **IDE-1759**: customer sees "CLI validation failure" when creating ignores from IntelliJ. When Snyk Code `FindingId` is missing (e.g. from cached scan without `snyk/asset/finding/v1` fingerprint), the GAF ignore workflow fails with a generic error that gives no actionable signal in logs.

**Motivation for logging improvements:** Generic errors (e.g. from the error catalog) make it hard for support and developers to diagnose failures. This PR improves log quality so we can:
- **Correlate** JSON-RPC errors with request IDs and error payloads without logging full response bodies.
- **Surface** Snyk CLI/extension error **detail** (from `snyk_errors.Error`) wherever we log command or version execution failures, so the real cause is visible instead of a single-line message.
- **Identify** the missing-finding-id case up front: when a user tries to create an ignore and the issue has no `FindingId`, we log a clear warning and tell them to rerun the Code scan, so logs and support can recognize the root cause instead of chasing a generic "CLI validation failure".

**Changes:**
- **ignores_request.go:** Warn when `findingId` is empty on ignore request; message states that `snyk/asset/finding/v1` may be absent and asks the user to rerun the Code scan to refresh finding IDs.
- **server.go:** On JSON-RPC response error, log `rsp.ID` and `rsp.Error` explicitly instead of the full response.
- **command_service.go** and **cli_extension_executor.go:** On command/version execution failure, if the error is a `snyk_errors.Error`, log `detail` in addition to the error so support and logs see the underlying CLI message.
Assets 2
Loading