Skip to content

API Common Errors

As you work on the project, you may run into some errors using the API. We list them here, along with possible causes and solutions.

No token

Cause: You did not supply a group token in an API call.

Solutions:

  • If you use the skeleton interface, this should never happen. The skeleton will stop you from making requests without a group token.
  • If you make requests yourself, make sure to supply a "group_token".

Invalid token

Cause: You supplied an invalid token in an API call.

Solutions:

  • Double-check your GROUP_TOKEN file if you use the skeleton.

Active rescue

Cause: You are already performing an active rescue and you attempted to start another one.

Solutions:

  • End the current rescue first before starting a new one.

No active rescue

Cause: You attempted to scout, remote, or end when there was no ongoing rescue.

Solutions:

  • Start a new rescue.

Malformed scout

Cause: Your attempt to scout was invalid in some way.

Solutions:

  • Make sure the student value i satisfies 1 \leq i \leq k, where k is the number of students in the current rescue.
  • Make sure the vertex you are scouting at is in the graph (1 \leq v \leq n, where n is the number of vertices in the graph).

Scout not allowed

Cause: Your scout violated some constraint. Most likely, you attempted to do a scout on a vertex that was involved in a remote. It's also possible you scouted the home.

Solutions:

  • The skeleton keeps track of which vertices you did remotes on. You should use the skeleton to check that you did not remote the vertex, nor did you scout the home.
  • If not using the skeleton, keep track of which vertices you do a remote on.

Malformed remote

Cause: Your attempt to remote u \to v was invalid in some way

Solutions:

  • Make sure both u and v are in the graph (1 \leq v, u \leq n, where n is then number of vertices in the graph).
  • Make sure u \neq v.
  • Make sure the edge \{ u, v \} is in the graph.

Malformed request

Cause: Your request body is malformed. This could be an invalid type or missing parameters.

Solutions:

  • If you're using the skeleton, double check the type of the variables you're using on the Skeleton Details page.
  • If you're writing your own solver, check to see you've correctly implemented the Spec.