获取409已要求的标识符已经存在。当事件不存在时
我的代码运行正常,但是现在我遇到了409个错误。
我正在从PHP系统中更新Google日历。
我使用唯一的系统密钥和域名来创建独特的caluid。
内容来检查这些UID
$service->events->listEvents()
然后,我通过使用我用于未返回的任何事件的返回的事件列表中发现的任何
$service->events->update().
,我添加了$ service- evestion- evest-> insert()
,使用$ event- seticaluid()
设置了caluid,
正如我所说的那样,这已经运行了多年,没有任何问题,而我最后的代码尚未更改。最近用户表示,他们的日历没有被更新,并且在调查中,我发现$ service- evest-> insert()
呼叫正在抛出409 “请求的标识符已经存在。”
异常。即使我知道caluid尚未存在,因为它没有从listEvents()调用中返回。
有什么变化吗?
409是指的是(我不是设置事件ID,因为文档似乎是在caluid和id之间,而不是两者之间)?
$服务对象是使用以下方式创建的:
$client = getGoogleAPIClient();
$service = new Google_Service_Calendar($client);
感谢您对此的任何帮助。
My code was running fine, but now I am getting 409 errors.
I am updating a Google calendar from my php system.
I am using a unique system key and my domain name to create a unique CalUID.
I then check these UID's against the existing entries by using
$service->events->listEvents()
For anything found in the returned list of events I use
$service->events->update().
For anything that is not returned, I add using $service->events->insert()
, having set the CalUID using $event->setICalUID()
As I say, this has been running for years without any issues and the code at my end has not been changed. Recently users said that their calendars were not being updated and on investigation I found that the $service->events->insert()
call was throwing a 409 "The requested identifier already exists."
exception. Even though I know that the CalUID does not already exist, as it is not returned from the listEvents() call.
Has something changed?
Is it the CalUID that the 409 is referring to (I am not setting the event id, as the documentation seems to say that its either/or between CalUID and ID, not both)?
The $service object is created using:
$client = getGoogleAPIClient();
$service = new Google_Service_Calendar($client);
Thanks for any help on this.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论