Api error: custom_fields: Value cannot be an array: []

We are getting the same error as well. Thank you for your efforts in deploying a fix.

1 Like

Looks like the deploy didn’t go through. A fix was made this morning and it’s fixed in beta. The next deploy is today around noon PST. I’ll double check at ~12:30 and reply here again.

Sorry for the delay!

Noon deploy didn’t go through. Sorry everyone. I’ll keep you posted.

I’ve heard word that it is successfully deployed. Please let me know if anyone has any more issues with it.

Thank you Ross and team. It seems to be working once again.

1 Like

It seems the deployed fix broke my workaround but the old method is working again. Weird!

We seem to be having this issue again…

"{"errors":[{"message":"Custom field with ID 357661098151969 is not on given object","help":"For more information on API status codes and how to handle them, read the docs on errors: https://developers.asana.com/docs/errors\“}]}”

Hi @Blake_Hickman,

That’s a different error than the one on this thread, " [Value cannot be an array:]" Can you start a new thread, and also post some more detail about the call you’re making and the data you’re sending that leads to the error?

Hello, I’m having the same issue with the endpoint PUT https://app.asana.com/api/1.0/tasks/{task_id}. I’ve tried several request bodies, like sending only number custom fields:

{
“assignee”: “1125617874516460”,
“name”: “Test Export”,
“notes”: “Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”,
“custom_fields”: { “1133368939974383”: 111, “1133368939974385”: 222 }
}

Sending only text custom fields:

{
“assignee”: “1125617874516460”,
“name”: “Test Export”,
“notes”: “Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”,
“custom_fields”: {
“1137900017649514”: “Test Business Owner”,
“1119367950437170”: “Test Netsuite Link”
}
}

Sending only enum fields:

{
“assignee”: “1125617874516460”,
“name”: “Test Export”,
“notes”: “Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”,
“custom_fields”: {
“1110501890349145”: “1138304714612571”,
“1187050470763071”: “1188527481393334”,
“1115239705030223”: “1141292520020783”,
“1115239705030230”: “1115239705030233”
}
}

Also sending them as numbers instead of strings:

{
“assignee”: “1125617874516460”,
“name”: “Test Export”,
“notes”: “Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.”,
“custom_fields”: {
“1110501890349145”: 1138304714612571,
“1187050470763071”: 1188527481393334,
“1115239705030223”: 1141292520020783,
“1115239705030230”: 1115239705030233
}
}

And finally sending only one custom field, but I get the same error every time:

{
“errors”: [
{
“message”: “custom_fields: Value cannot be an array: ”,
“help”: “For more information on API status codes and how to handle them, read the docs on errors: Errors
}
]
}

If I remove the custom fields works fine by the way. Also, the POST request with all the custom fields works too. Any ideas of what might be the error? Thanks in advance,

Gabriel.

Hi @Gabriel_Rezk and welcome to the forum!

I know it shouldn’t matter but curious if you tried just setting one custom field/value? Does that make any difference in the result?

Thank you Phil! Yes, it was the last thing I tried, but got the same result.

Hmmm… @Ross_Grambo any ideas on this issue?

Curious if anyone has solved this. We’re seeing the exact same issue still. Thanks!

Hi @Nick_Rivero,

Can you post your code? Not sure it’ll help given the above discussion but it might trigger something…

@Phil_Seeman I wanted to clarify that I was able to solve this via different use of Syntax. As I saw it, the issue was in my formatting when sending an array with a single item vs a larger array with multiple items.

1 Like

Hi Nick, any chance you can share the syntax that works for you? We’re still getting the error.

POST TASK PAYLOAD

“data”: {
“workspace”: “7381487357546”,
“custom_fields”: {
“1200737953016660”: “2021-08-19”,
“1200543051952175”: “David’s Asana Test36”,
“1200737875826522”: “13:30”,
“1200725555943582”: “API”,
“1201222048865938”: “N/A”,
“1200737959399003”: “Bell Center”,
“1201222048865953”: "

  • Item 1
  • Item 2
  • Item 3

"
}
}

RESPONSE
400 Bad Request: {“errors”:[{“message”:“custom_fields: Value cannot be an array: ”,“help”:“For more information on API status codes and how to handle them, read the docs on errors: Asana”}]}