mirror of
https://github.com/christianselig/apollo-backend
synced 2024-11-14 16:07:42 +00:00
25 lines
470 B
Go
25 lines
470 B
Go
package reddit
|
|
|
|
import (
|
|
"errors"
|
|
"fmt"
|
|
)
|
|
|
|
type ServerError struct {
|
|
StatusCode int
|
|
}
|
|
|
|
func (se ServerError) Error() string {
|
|
return fmt.Sprintf("error from reddit: %d", se.StatusCode)
|
|
}
|
|
|
|
var (
|
|
// ErrOauthRevoked .
|
|
ErrOauthRevoked = errors.New("oauth revoked")
|
|
// ErrTimeout .
|
|
ErrTimeout = errors.New("timeout")
|
|
// ErrRateLimited .
|
|
ErrRateLimited = errors.New("rate limited")
|
|
// ErrRequiresRedditId .
|
|
ErrRequiresRedditId = errors.New("requires reddit id")
|
|
)
|