Skip to content

Commit

Permalink
Report booking errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zdevaty committed May 14, 2024
1 parent 389281f commit efe0e64
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,12 @@ func bookInEWS(book model.Booking, config apiserver.Configuration) {
log.Debug("ews", "booking for %v was conflicting; cancelled", book.OrganizerEmail)
} else if err != nil {
log.Error("ews", "creating appointment: %v", err)
log.Debug("ews", "cancelling booking %v", book.ElionaID)
bc := booking.NewClient(*config.BookingAppURL)
if err := bc.Cancel(book.ElionaID, "error"); err != nil {
log.Error("booking", "cancelling errored appointment: %v", err)
return
}
return
}
log.Debug("ews", "created a booking for %v", book.OrganizerEmail)
Expand Down

0 comments on commit efe0e64

Please sign in to comment.