Skip to main content

Invalid sample

typehttps://docs.frem.sh/reference/api/errors/invalid-sample
HTTP status400 Bad Request

What it means

A SAST rule has no test sample, or it is not text. The scanner runs the rule on its sample; a rule that finds nothing there is rejected.

Example detail messages returned with this error:

  • sample (code the rule must find) is required.
  • sample must be text.

What to do

Send code the rule must find in sample.

Response shape

All fremforge API errors are RFC 9457 problem+json:

{
  "type": "https://docs.frem.sh/reference/api/errors/invalid-sample",
  "title": "Bad Request",
  "status": 400,
  "detail": "..."
}

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