Files
webmail/lib/jmap/scheduling-error.ts
T
Linus Rath d7fdd7ce61 fix: offer to save an event when the server refuses its invitations
From 0.16.21 Stalwart fails the whole CalendarEvent/set with
`forbidden` when the account may not send scheduling messages, so an
event with attendees was not saved at all and the calendar showed only
"Failed to save event".

Such a refusal now surfaces as SchedulingDeniedError, and the calendar
names the server's reason and offers to save the event without sending
the invitations.
2026-09-22 21:25:20 +02:00

13 lines
442 B
TypeScript

/**
* The server refused the change because of the iTIP messages it would send
* (Stalwart 0.16.21+ fails the whole CalendarEvent/set with `forbidden`
* when the account may not send scheduling messages). The same change
* without `sendSchedulingMessages` can still be saved.
*/
export class SchedulingDeniedError extends Error {
constructor(readonly reason: string) {
super(reason);
this.name = 'SchedulingDeniedError';
}
}