mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-26 06:58:27 +00:00
Log more information about gomatrix.HTTPError
This commit is contained in:
parent
a060df91e2
commit
39ceb8156e
1 changed files with 2 additions and 1 deletions
|
@ -415,7 +415,7 @@ func (oq *destinationQueue) nextTransaction(
|
|||
ctx, cancel := context.WithTimeout(oq.process.Context(), time.Minute*5)
|
||||
defer cancel()
|
||||
_, err := oq.client.SendTransaction(ctx, t)
|
||||
switch err.(type) {
|
||||
switch e := err.(type) {
|
||||
case nil:
|
||||
// Clean up the transaction in the database.
|
||||
if pduReceipts != nil {
|
||||
|
@ -438,6 +438,7 @@ func (oq *destinationQueue) nextTransaction(
|
|||
case gomatrix.HTTPError:
|
||||
// Report that we failed to send the transaction and we
|
||||
// will retry again, subject to backoff.
|
||||
log.WithError(err).WithField("code", e.Code).WithField("message", e.Message).WithField("content", string(e.Contents)).Error("gomatrix.HTTPError when sending transaction")
|
||||
return false, 0, 0, err
|
||||
default:
|
||||
log.WithFields(log.Fields{
|
||||
|
|
Loading…
Reference in a new issue