This repository has been archived on 2023-04-13. You can view files and clone it, but cannot push or open issues or pull requests.
2016-03-09 15:14:42 +00:00
|
|
|
package discogs
|
|
|
|
|
|
|
|
import (
|
|
|
|
"fmt"
|
2018-03-24 13:14:54 +00:00
|
|
|
"strings"
|
2016-03-09 15:14:42 +00:00
|
|
|
)
|
|
|
|
|
2018-03-24 13:14:54 +00:00
|
|
|
// Error represents a Discogs API error
|
|
|
|
type Error struct {
|
|
|
|
Message string
|
2016-03-09 15:14:42 +00:00
|
|
|
}
|
|
|
|
|
2018-03-24 13:14:54 +00:00
|
|
|
func (e *Error) Error() string {
|
|
|
|
return fmt.Sprintf("%s", strings.ToLower(e.Message))
|
2016-03-09 15:14:42 +00:00
|
|
|
}
|
|
|
|
|
2018-03-24 13:14:54 +00:00
|
|
|
// APIErrors
|
|
|
|
var (
|
|
|
|
ErrCurrencyNotSupported = &Error{"currency does not supported"}
|
|
|
|
ErrUserAgentInvalid = &Error{"invalid user-agent"}
|
|
|
|
)
|