400 Bad Request when updating DueDate or creating new task with DueDate
I am trying to update dueDate for task:
Task updatedTask = service.tasks.get(gTask.getTaskListGuid(), gTask.getGuid()).execute();
updatedTask.setTitle(gTask.getTitle());
updatedTask.setNotes(gTask.getDescription());
updatedTask.setDue(gTask.getDueDate());
service.tasks.update(gTask.getTaskListGuid(), gTask.getGuid(), updatedTask).execute();
But api returns me:
10:49:40,323 ERROR GTasksServiceProcessor.[main]processUpdatedTasks:81 - Can't update task: com.google.api.client.http.HttpResponseException: 400 Bad Request
com.google.api.client.http.HttpResponseException: 400 Bad Request
at com.google.api.client.http.HttpRequest.execute(HttpRequest.java:708)
at com.google.api.services.tasks.Tasks$RemoteRequest.execute(Tasks.java:1574)
at com.google.api.services.tasks.Tasks$TasksOperations$Update.executeUnparsed(Tasks.java:870)
at com.google.api.services.t开发者_JS百科asks.Tasks$TasksOperations$Update.execute(Tasks.java:855)
at ua.com.stormlabs.gap.gtasks.GTasksManager.updateTask(GTasksManager.java:120)
at ua.com.stormlabs.gap.gtasks.GTasksServiceProcessor.processUpdatedTasks(GTasksServiceProcessor.java:78)
at ua.com.stormlabs.gap.gtasks.GTasksServiceProcessor.start(GTasksServiceProcessor.java:51)
at ua.com.stormlabs.gap.gtasks.GTasksGapApp.main(GTasksGapApp.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
Where is a problem? I have same exception when trying to create new task with dueDate.
Also I found thread: http://groups.google.com/group/google-tasks-api/browse_thread/thread/1753df5bbc8e3cb8/ab66b5e675f06e6a?lnk=gst&q=problem+changing#ab66b5e675f06e6a But it doesn't help me.
This fixed it for me: https://groups.google.com/d/msg/google-tasks-api/F1PfW7yOPLg/3Awlcivpb1oJ
精彩评论