mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-14 15:22:50 +00:00
/send auth errors are silent (#1149)
* /send auth errors are silent * Fix test
This commit is contained in:
parent
a1352cbd9e
commit
02565c37aa
2 changed files with 14 additions and 2 deletions
|
@ -176,9 +176,17 @@ func (t *txnReq) processTransaction() (*gomatrixserverlib.RespSend, error) {
|
|||
util.GetLogger(t.context).Warnf("Processing %s failed fatally: %s", e.EventID(), err)
|
||||
return nil, err
|
||||
} else {
|
||||
util.GetLogger(t.context).WithError(err).WithField("event_id", e.EventID()).Warn("Failed to process incoming federation event, skipping")
|
||||
// Auth errors mean the event is 'rejected' which have to be silent to appease sytest
|
||||
_, rejected := err.(*gomatrixserverlib.NotAllowed)
|
||||
errMsg := err.Error()
|
||||
if rejected {
|
||||
errMsg = ""
|
||||
}
|
||||
util.GetLogger(t.context).WithError(err).WithField("event_id", e.EventID()).WithField("rejected", rejected).Warn(
|
||||
"Failed to process incoming federation event, skipping",
|
||||
)
|
||||
results[e.EventID()] = gomatrixserverlib.PDUResult{
|
||||
Error: err.Error(),
|
||||
Error: errMsg,
|
||||
}
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -44,3 +44,7 @@ Existing members see new members' join events
|
|||
Can recv device messages over federation
|
||||
Device messages over federation wake up /sync
|
||||
Wildcard device messages over federation wake up /sync
|
||||
|
||||
# We don't implement soft-failed events yet, but because the /send response is vague,
|
||||
# this test thinks it's all fine...
|
||||
Inbound federation accepts a second soft-failed event
|
||||
|
|
Loading…
Reference in a new issue