1

Can not create grunt with timeRestrictionIcal, get TimeRestrictionIcalMalformed error

Parameters:

{
  "boundLockId": "string",
  "contactId": "string",
  "timeRestrictionIcal":"string"
}

Where timeRestrictionIcal is

BEGIN:VCALENDAR
VERSION:2.0
PRODID:http://localhost:3000
BEGIN:VEVENT
UID:20230422T030000Z62505530-4988-4a93-acff-1f673e50bf76
DTSTAMP:20230422T030000Z
DTSTART; TZID=Europe/Uzhgorod:20230425T030000
DTEND; TZID=Europe/Uzhgorod:20230425T130000
END:VEVENT
END:VCALENDAR

How to create tapkey grunt with timeRestrictionIcal param?

ChrisGPT was on strike
  • 127,765
  • 105
  • 273
  • 257
  • Please read [Why should I not upload images of code/data/errors?](https://meta.stackoverflow.com/q/285551/354577) Instead, format code as a [code block]. The easiest way to do this is to paste the code as text directly into your question, then select it and click the code block button. – ChrisGPT was on strike Apr 21 '23 at 20:07

1 Answers1

1

It seems that the problem are causing unecessary whitespaces

  • After every \n there is an unecessary space
  • After DTSTART; and DTEND; there is unecessary space as well

Once you get rid of them that request goes through successfully.

Result ICAL:

BEGIN:VCALENDAR\nVERSION:2.0\nPRODID:http://localhost:3000\nBEGIN:VEVENT\nUID:20230422T030000Z62505530-4988-4a93-acff-1f673e50bf76\nDTSTAMP:20230422T030000Z\nDTSTART;TZID=Europe/Uzhgorod:20230425T030000\nDTEND;TZID=Europe/Uzhgorod:20230425T130000\nEND:VEVENT\nEND:VCALENDAR
eduard
  • 408
  • 3
  • 13