mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28: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)
|
ctx, cancel := context.WithTimeout(oq.process.Context(), time.Minute*5)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
_, err := oq.client.SendTransaction(ctx, t)
|
_, err := oq.client.SendTransaction(ctx, t)
|
||||||
switch err.(type) {
|
switch e := err.(type) {
|
||||||
case nil:
|
case nil:
|
||||||
// Clean up the transaction in the database.
|
// Clean up the transaction in the database.
|
||||||
if pduReceipts != nil {
|
if pduReceipts != nil {
|
||||||
|
@ -438,6 +438,7 @@ func (oq *destinationQueue) nextTransaction(
|
||||||
case gomatrix.HTTPError:
|
case gomatrix.HTTPError:
|
||||||
// Report that we failed to send the transaction and we
|
// Report that we failed to send the transaction and we
|
||||||
// will retry again, subject to backoff.
|
// 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
|
return false, 0, 0, err
|
||||||
default:
|
default:
|
||||||
log.WithFields(log.Fields{
|
log.WithFields(log.Fields{
|
||||||
|
|
Loading…
Reference in a new issue