Skip to main content

Unknown field

typehttps://docs.frem.sh/reference/api/errors/unknown-field
HTTP status400 Bad Request

What it means

The request body carried a field the endpoint does not recognise, so it was rejected rather than ignored.

Endpoints that accept partial updates treat an absent field as “leave this alone”. A field name they do not know is indistinguishable from an absent one, so silently ignoring it would return 200 over a change that never happened. These endpoints therefore refuse the whole request instead.

Example detail messages returned with this error:

  • Unrecognised field(s): “securityAutomerge” (did you mean “security_automerge”?). Accepted fields are: enabled, automerge_patch, automerge_minor, major_approval, security_automerge, schedule, pr_hourly_limit, pr_concurrent_limit.
  • Unrecognised field(s): “automerge_everything”. Accepted fields are: enabled, automerge_patch, automerge_minor, major_approval, security_automerge, schedule, pr_hourly_limit, pr_concurrent_limit.

What to do

Read the detail: it names every field that was not recognised and lists the ones the endpoint accepts.

Check the case first. Request fields are snake_case, matching the underlying column names. Several endpoints serialise their responses in camelCase, so copying a field name out of a response body and sending it back is the most common cause of this error. Where the field you sent is a camelCase spelling of a real one, the detail names the correct spelling.

// rejected - camelCase, as returned in a response body
{ "securityAutomerge": true }

// accepted
{ "security_automerge": true }

Otherwise, compare the body with the request schema in the OpenAPI spec.

Response shape

All fremforge API errors are RFC 9457 problem+json:

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

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