4
0
mirror of https://github.com/cwinfo/matterbridge.git synced 2025-07-04 03:07:44 +00:00

Update dependencies (#1851)

This commit is contained in:
Wim
2022-06-25 00:36:16 +02:00
committed by GitHub
parent 5604d140e3
commit 4649876956
87 changed files with 10535 additions and 4392 deletions

View File

@ -1,28 +0,0 @@
package misc
import (
"fmt"
"net/http"
)
// StatusCodeError represents an http response error.
// type httpStatusCode interface { HTTPStatusCode() int } to handle it.
type StatusCodeError struct {
Code int
Status string
}
func (t StatusCodeError) Error() string {
return fmt.Sprintf("slack server error: %s", t.Status)
}
func (t StatusCodeError) HTTPStatusCode() int {
return t.Code
}
func (t StatusCodeError) Retryable() bool {
if t.Code >= 500 || t.Code == http.StatusTooManyRequests {
return true
}
return false
}