forked from MirrorHub/mautrix-whatsapp
Include debug message when receiving 599 status code
This commit is contained in:
parent
cccaa62a20
commit
63933d0c7e
3 changed files with 7 additions and 1 deletions
2
go.mod
2
go.mod
|
@ -16,4 +16,4 @@ require (
|
|||
maunium.net/go/mautrix v0.7.13
|
||||
)
|
||||
|
||||
replace github.com/Rhymen/go-whatsapp => github.com/tulir/go-whatsapp v0.3.10
|
||||
replace github.com/Rhymen/go-whatsapp => github.com/tulir/go-whatsapp v0.3.11
|
||||
|
|
2
go.sum
2
go.sum
|
@ -109,6 +109,8 @@ github.com/tidwall/sjson v1.1.1 h1:7h1vk049Jnd5EH9NyzNiEuwYW4b5qgreBbqRC19AS3U=
|
|||
github.com/tidwall/sjson v1.1.1/go.mod h1:yvVuSnpEQv5cYIrO+AT6kw4QVfd5SDZoGIS7/5+fZFs=
|
||||
github.com/tulir/go-whatsapp v0.3.10 h1:LfzRj6V3dshKemad3HZsgYgKAZtaT0wNITmobJYAbro=
|
||||
github.com/tulir/go-whatsapp v0.3.10/go.mod h1:U5+sm33vrv3wz62YyRM/VS7q2ObXkxU4Xqj/3KOmN9o=
|
||||
github.com/tulir/go-whatsapp v0.3.11 h1:z9AvTb8YXYP8t6Y0jium3reshgDpFCg//WNiCGo9esQ=
|
||||
github.com/tulir/go-whatsapp v0.3.11/go.mod h1:U5+sm33vrv3wz62YyRM/VS7q2ObXkxU4Xqj/3KOmN9o=
|
||||
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
||||
golang.org/x/crypto v0.0.0-20200604202706-70a84ac30bf9 h1:vEg9joUBmeBcK9iSJftGNf3coIG4HqZElCPehJsfAYM=
|
||||
|
|
|
@ -1976,6 +1976,10 @@ func (portal *Portal) HandleMatrixMessage(sender *User, evt *event.Event) {
|
|||
}
|
||||
if err != nil {
|
||||
portal.log.Errorfln("Error handling Matrix event %s: %v", evt.ID, err)
|
||||
var statusResp whatsapp.StatusResponse
|
||||
if errors.As(err, &statusResp) && statusResp.Status == 599 {
|
||||
portal.log.Debugln("Extra info in 599 error: %+v", statusResp.Extra)
|
||||
}
|
||||
portal.sendErrorMessage(err)
|
||||
} else {
|
||||
portal.log.Debugfln("Handled Matrix event %s", evt.ID)
|
||||
|
|
Loading…
Reference in a new issue