Troubleshooting · Developer docs

Troubleshooting

Grouped by symptom, never by module, because the person with the problem does not know which module has it. One hundred questions across ten pages, each answered with the causes in the order they usually turn out to be true.

Answer API requests

The API answers 404 for a record that exists

A 404 with Page or record not found means the route, the method or the caller did not match, as often as it means the record is missing. Check, in this order:

  • The method. Creating goes to the type's route without an id: POST /cdna-api/pages/page. A POST to a record's own route, /pages/page/1885, is a 404; editing it is PUT.
  • Singular or plural. One record is the singular (pages/page/1885), a list the plural (pages/pages). On custom entities, the plural with an id is a 404.
  • The record type. Books, units and book pages share ids with pages but each has its own route: a book page is books/page/{id}, not pages/page/{id}.
  • Who is asking. A signed-in site member is refused with a 404 on everything outside the visitor routes, so the refusal looks like a missing route. A backend user's OAuth token or API key is the credential for this.
  • A repeated delete. The second DELETE of a record answers 404: the first one worked.

Every status the API answers with is in Responses and errors; the member and backend-user difference is in Authentication and authorisation.

More in API requests

  1. My edit saved, but the site did not change
  2. "Invalid reference to related records at activeRevision; expecting an id" when I send activeRevision: true
  3. Updating one area emptied the others
  4. My patch changed the wrong section, with no error
  5. A multiselect area answers 422 "Unexpected associative array encountered"

Was this page helpful?

Your answer goes to the docs team.