mirror of
https://github.com/chainreactors/spray.git
synced 2025-09-15 19:50:18 +00:00
23 lines
327 B
Go
23 lines
327 B
Go
package internal
|
|
|
|
type ErrorType uint
|
|
|
|
const (
|
|
ErrBadStatus ErrorType = iota
|
|
ErrWaf
|
|
ErrRedirect
|
|
)
|
|
|
|
func (e ErrorType) Error() string {
|
|
switch e {
|
|
case ErrBadStatus:
|
|
return "bad status"
|
|
case ErrWaf:
|
|
return "maybe ban of waf"
|
|
case ErrRedirect:
|
|
return "duplicate redirect url"
|
|
default:
|
|
return "unknown error"
|
|
}
|
|
}
|