Erros in batch request

Hi everyone,

I’m having trouble making batch requests using the Asana API. With these batch requests, we retrieve tasks assigned to a specific person. It has been working perfectly for months, but last week we started receiving a 500 status code error:

“Oops! An unexpected error occurred while processing this request. The input may have contained something the server did not know how to handle…”

Sometimes, I even get a 200 response, but with some errors in the response.

Are there any known issues with the Asana API, or has something changed?

body request example:

{
  "data": {
    "actions": [
      {
        "options": {
          "fields": [
            "gid",
            "name",
            "custom_fields",
            "assignee_section.gid",
            "assignee_section.name",
            "assignee_section.resource_type",
            "completed",
            "created_at",
            "due_on",
            "modified_at",
            "notes",
            "projects.gid",
            "projects.name",
            "projects.resource_type",
            "resource_subtype",
            "resource_type",
            "start_on",
            "assignee.gid",
            "assignee.name",
            "assignee.resource_type",
            "actual_time_minutes",
            "dependents",
            "dependencies",
            "parent.name",
            "parent.gid",
            "parent.resource_type",
            "parent.projects.name",
            "created_by.email",
            "approval_status"
          ]
        },
        "data": {
          "assignee": "ASSIGNEE_ID",
          "workspace": "WORKSPACE_ID",
          "completed_since": "now"
        },
        "relative_path": "/tasks",
        "method": "get"
      }
    ]
  }
}

Complete errror response

{
  "errors": [
    {
      "message": "Oops! An unexpected error occurred while processing this request. The input may have contained something the server did not know how to handle. Usually waiting and then retrying the request once fixes this. If the issue is persistent, please navigate to https://help.asana.com and engage with our chatbot, making sure to include the error phrase from this response.",
      "help": "For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors",
      "phrase": "20 heavy pandas plan awfully angrily"
    }
  ]
}

@John_Vu @John_Baldo are you able to check on this error phrase?

Hi @lbreg, I looked up the error and it looks like an runtime exception. So trying again might work. Are you still experiencing this issue?

Is the Submit parallel requests (POST /batch) endpoint failing itself or is it the case where one of the GET /tasks call in the batch request is failing?

Hi @John_Vu, thank you for the reply.

Actually we’ve been experiencing failures and slowness in the service since the last week, both in the Asana Api and Asana page. (Dunno if this infomation is relevant, we are located in Brazil.)
I added some more retries to the failing one request to get its data.

Is the Submit parallel requests (POST /batch) endpoint failing itself or is it the case where one of the GET /tasks call in the batch request is failing?

A: Both happens, although it is more common to fail one of the GET.

@lbreg Thank you for sharing. I’ll pass this info along to our dev team. For now I would rely on your retries.

If you come across similar errors, please share the error phrases with us to assist in our investigation.

1 Like