Hey guys,
over the last weeks we have been tracking down a weird Nullpointer that we could finally nail down to the AsanaClient returning null on some task creation requests.
The specific thing about the request where we could analyse the root cause is that it usually fails with a com.asana.errors.InvalidRequestError: Invalid Request (followers: [1]: Not an email, GID, or "me": )
error - but if this request is done often enough at some point it will just return null instead of throwing an exception.
So I’d like to report this inconsistent and flaky behaviour → after the first analysis it would also be great to get an idea if this might affect other object creation methods aswell.
We could observe this behaviour continuously in a flaky manner using the following taskRequestBuilder:
requestBuilder: {
name="my fancy name",
notes="my fancy notes",
assignee="validAssingeeEmail@domain.com",
completed=false,
followers=["validAssigneeEmail.@domain.com", ""],
projects=["projectId1", "projectId2", "projectId3", "projectId4"]
}
The second follower in the list is an empty string - and usually it would trigger the above mentioned error - but sometimes the API-client just doesn’t report an error but returns a null Task instead (no task is created in asana).
Best Regards,
Ron
Update:
Could now reproduce the same sporadic NullPointer behaviour with the following error smarter.ecommerce.commons.asana.AsanaApiException: com.asana.errors.InvalidRequestError: Invalid Request (projects: [2]: Unknown object: myProjectId)
The behaviour is stable enough that with a repeatedly sending wrong request I can reproduce it in a test!