mirror of
https://github.com/terorie/od-database-crawler.git
synced 2025-12-13 15:19:03 +00:00
Unescape results & don't recrawl 404
This commit is contained in:
13
errors.go
13
errors.go
@@ -1,8 +1,17 @@
|
||||
package main
|
||||
|
||||
import "errors"
|
||||
import (
|
||||
"errors"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
var ErrRateLimit = errors.New("too many requests")
|
||||
var ErrForbidden = errors.New("access denied")
|
||||
var ErrKnown = errors.New("already crawled")
|
||||
|
||||
type HttpError struct {
|
||||
code int
|
||||
}
|
||||
|
||||
func (e HttpError) Error() string {
|
||||
return fmt.Sprintf("http status %d", e.code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user