Report errors on sending to RS input

This commit is contained in:
Neil Alexander 2022-01-17 11:53:42 +00:00
parent 14327faaf6
commit 3a62494082
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944

View file

@ -284,7 +284,7 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res
// pass the event to the roomserver which will do auth checks
// If the event fail auth checks, gmsl.NotAllowed error will be returned which we be silently
// discarded by the caller of this function
_ = api.SendEvents(
if err = api.SendEvents(
context.Background(),
t.rsAPI,
api.KindNew,
@ -295,8 +295,15 @@ func (t *txnReq) processTransaction(ctx context.Context) (*gomatrixserverlib.Res
api.DoNotSendToOtherServers,
nil,
true,
)
); err != nil {
util.GetLogger(ctx).WithError(err).Warnf("Transaction: Couldn't submit event %q to input queue: %s", event.EventID(), err)
results[event.EventID()] = gomatrixserverlib.PDUResult{
Error: err.Error(),
}
continue
}
util.GetLogger(ctx).WithError(err).Infof("XXX: Submitted event %q into input queue", event.EventID())
results[event.EventID()] = gomatrixserverlib.PDUResult{}
}