error traping on advGCalendar/advliveCalendar/iClo

I tried to upload a lot off calendar items and some did not upload.


first problem:
20140513T205228:HTTPS POST RES:403
20140513T205228:HTTPS POST RESULT:{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "rateLimitExceeded",
    "message": "Rate Limit Exceeded"
   }
  ],
  "code": 403,
  "message": "Rate Limit Exceeded"
 }
}

Can this be trapped in code?

Second problem:
Sometimes I get a parse error
There is some data that could not upload in to the item.summary

At this moment I can be detected that no item.id returns form the item so it is not created.

Thanks

Eddy

Hi,


Thank you for your suggestion.
Improved error handling is on our feature-request list and we'll investigate if this kind of functionality can be implemented in a future version of the TMS Cloud Pack.

Solution for

 
20140518T114102:HTTPS POST RES:400
20140518T114102:HTTPS POST RESULT:{
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "parseError",
    "message": "Parse Error"
   }
  ],
  "code": 400,
  "message": "Parse Error"
 }
}
When update data you need to encode to utf8
example:
Gi.Summary := UTF8Encode(summary);

Some characters aren't compatible like (é,è,....)
Should this be handeld by the component?

Eddy

Previous problem is with advLivecalendar and not advGCalendar:

It typecast the string to ansistring instat of UTF8

procedure TAdvLiveCalendar.Update(Item: TLiveCalendarItem);
...
 data := ansistring(GetCalendarData(Item));
...
 
Eddy

an other problem with parse error is CrLf


a #D#A is replace by \n
sometimes there is only a #D witch is not replace an gives an parse error

I solved it by doing an replacestring again

Eddy

We've fixed the encoding issue.
We're looking further at the CrLf issue.