mirror of
https://github.com/number571/go-peer.git
synced 2026-09-13 18:45:44 +05:00
23 lines
457 B
Go
23 lines
457 B
Go
package api
|
|
|
|
const (
|
|
errPrefix = "internal/api = "
|
|
)
|
|
|
|
type SApiError struct {
|
|
str string
|
|
}
|
|
|
|
func (err *SApiError) Error() string {
|
|
return errPrefix + err.str
|
|
}
|
|
|
|
var (
|
|
ErrBadStatusCode = &SApiError{"bad status code"}
|
|
ErrReadResponse = &SApiError{"read response"}
|
|
ErrLoadResponse = &SApiError{"load response"}
|
|
ErrBadRequest = &SApiError{"bad request"}
|
|
ErrBuildRequest = &SApiError{"build request"}
|
|
ErrCopyBytes = &SApiError{"copy bytes"}
|
|
)
|