Skip to main content

Security fix: pr finding

typehttps://docs.frem.sh/reference/api/errors/autofix-pr-finding
HTTP status422 Unprocessable Entity

What it means

Returned by POST /orgs/{org}/code-security/deps/findings/{id}/autofix and POST /orgs/{org}/code-security/sast/findings/{id}/autofix (Security fixes). No pull request was requested.

Since 2026-10-14 the same refusal is answered with the type security-fix-pr-finding from POST /orgs/{org}/dependency-updates/security-fixes/requests and with the type ai-fix-pr-finding from POST /orgs/{org}/code-security/sast/findings/{id}/ai-fix. The paths above are deprecated and keep answering autofix-pr-finding until 2027-10-15. Branch on either type.

Example detail message returned with this error:

  • The finding was raised on a pull request. Security fixes are for findings on the default branch; fix it in the pull request itself.

The response also carries "reason": "pr_finding".

What to do

Fix it in that pull request.

Response shape

All fremforge API errors are RFC 9457 problem+json:

{
  "type": "https://docs.frem.sh/reference/api/errors/autofix-pr-finding",
  "title": "Unprocessable Entity",
  "status": 422,
  "detail": "...",
  "reason": "pr_finding"
}

Branch on type, not on title or detail - those are human-readable and may be reworded.