apollo-backend/internal/reddit/errors.go

22 lines
323 B
Go
Raw Normal View History

2021-08-14 17:42:28 +00:00
package reddit
import (
"errors"
"fmt"
)
type ServerError struct {
StatusCode int
}
func (se ServerError) Error() string {
return fmt.Sprintf("errror from reddit: %d", se.StatusCode)
}
var (
// ErrOauthRevoked .
ErrOauthRevoked = errors.New("oauth revoked")
2021-08-14 18:07:19 +00:00
// ErrTimeout .
ErrTimeout = errors.New("timeout")
2021-08-14 17:42:28 +00:00
)