Skip to content
Contents

Guides

Errors

HTTP status codes and GraphQL error codes of the Nipto API, and what to do about each.

An error always comes back as JSON with an errors list. Each error has a message for humans and an extensions.code for your automations. Errors about one field also carry path and locations, and data holds null for that field.

{
  "errors": [
    {
      "message": "Task not found",
      "locations": [{ "line": 1, "column": 12 }],
      "path": ["createActivity"],
      "extensions": { "code": "INTERNAL_SERVER_ERROR" }
    }
  ],
  "data": { "createActivity": null }
}

HTTP status

Problems with the call itself use the HTTP status, so tools like Home Assistant see them as failures:

StatusCodeWhenWhat to do
200noneThe call worked, or a field failed for a reason of its own (below)Read data, then check errors
400GRAPHQL_PARSE_FAILEDThe query is not valid GraphQLFix the syntax
400GRAPHQL_VALIDATION_FAILEDThe query asks for a field or argument that does not existCompare with the reference
400BAD_USER_INPUTA variable is missing or has the wrong type, or the body is not JSON with a queryFix the variables or the body
401UNAUTHENTICATEDNo token, an unknown or revoked token, or a token whose owner is no longer in a tribeCheck the token, see Authentication
403FORBIDDENPremium ended more than 7 days agoRenew Premium, see Premium
429TOO_MANY_REQUESTSMore than 2,000 calls todayWait for Retry-After, see Rate limits

Errors on a field

When the call is fine but a mutation cannot do what it was asked, the status stays 200 and the error is in errors:

CodeExamples
BAD_USER_INPUTcreateActivity without doers; a paused member as doer; limit below 1; a repeat out of bounds; rotate without repeat
FORBIDDENdeleteActivity refused, as the app would: members under parental control cannot delete, and only an admin can refuse an activity waiting for approval
INTERNAL_SERVER_ERROROther refusals, with a message saying why: Task not found, User not found, Date cannot be in the future, Date cannot be in the previous weeks, Activity cannot be deleted if week is ended, Date must be today or in the future