Files
imgproxy/imagedata/timeout.go

15 lines
252 B
Go

package imagedata
import "errors"
type httpError interface {
Timeout() bool
}
func checkTimeoutErr(err error) error {
if httpErr, ok := err.(httpError); ok && httpErr.Timeout() {
return errors.New("The image request timed out")
}
return err
}