Skip to contentSkip to navigationSkip to topbar
Page toolsOn this pageProducts used
Looking for more inspiration?Visit the

40005: Assignment Callback response does not contain Instruction


WARNING: 40005

warning-40005 page anchor
TASKROUTER
WARNING

This warning occurs when TaskRouter receives a 200 OK Assignment Callback response with a JSON body, but that body does not include the required instruction key. If you want TaskRouter to take immediate action on the Reservation, return a valid JSON object that includes instruction. If you want to handle the Reservation later, return an empty JSON document such as {} and update the Reservation through the Reservations API when you are ready.

Possible causes

possible-causes page anchor
  • Your Assignment Callback returned JSON that did not include the required instruction key.
  • Your application attempted to send an assignment instruction, such as accept, reject, dequeue, call, or redirect, but omitted the instruction field from the JSON response.
  • Your application intended to defer the decision and handle the Reservation asynchronously, but returned non-empty JSON instead of an empty JSON document such as {}.
  • If you want TaskRouter to act immediately, return Content-Type: application/json and a valid JSON object that includes instruction with a supported value such as accept, reject, dequeue, call, or redirect.
  • If you want to process the Reservation asynchronously, return an empty JSON document such as {} with 200 OK, then accept or reject the Reservation later through the Reservations API.
  • Verify that your Assignment Callback response body is valid JSON and includes instruction whenever you return an assignment instruction.

Additional resources

additional-resources page anchor