Skip to content

Commit

Permalink
Fix sync error message (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
amh4r authored Sep 22, 2024
1 parent dccf7b2 commit 346c97e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -287,15 +287,22 @@ func (h *handler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
// all functions and automatically allows all functions to immediately be triggered
// by incoming events or schedules.
func (h *handler) register(w http.ResponseWriter, r *http.Request) error {
var syncKind string
var err error
if r.Header.Get(HeaderKeySyncKind) == SyncKindInBand && h.IsInBandSyncAllowed() {
syncKind = SyncKindInBand
err = h.inBandSync(w, r)
} else {
syncKind = SyncKindOutOfBand
err = h.outOfBandSync(w, r)
}

if err != nil {
h.Logger.Error("out-of-band sync error", "error", err)
h.Logger.Error(
"sync error",
"error", err,
"syncKind", syncKind,
)
}
return err
}
Expand Down

0 comments on commit 346c97e

Please sign in to comment.