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

"Could not find the referenced record with id 0"

A relation was sent as 0, which the API reads as the id of a record and cannot find. To clear a relation, send null; to leave it alone, leave the key out. Many client libraries and forms turn an empty value into 0, so convert it to null before sending.

The same message with another number means no record of that type has that id. An image or file id that does not exist is reported under image or file rather than under the field's name.

JavaScript
{"parent": 0}       // 422 Could not find the referenced record with id 0
{"parent": null}    // clears it
{}                  // leaves it unchanged

One exception: a custom URL is cleared with {"customUrl": {"url": ""}}, not with null. The rules for relations are in A relation as an id or an object.

More in API requests

  1. A custom URL is set after creating the record, and cleared with an empty string
  2. My DELETE timed out: did it go through?
  3. My OAuth token stopped working after four hours: 403 "Token doesn't exist or is not valid"
  4. GraphQL answers 500 "Currently, only Query GraphQL requests are supported by this API"
  5. My form submission through the API answered 207

Was this page helpful?

Your answer goes to the docs team.