aboutsummaryrefslogtreecommitdiffstats
path: root/client.go
diff options
context:
space:
mode:
Diffstat (limited to 'client.go')
-rw-r--r--client.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/client.go b/client.go
index ad7536f..f9708c7 100644
--- a/client.go
+++ b/client.go
@@ -7,6 +7,7 @@ import (
"net/url"
"strings"
+ "github.com/tyba/srcd-crawler/clients/common"
"github.com/tyba/srcd-crawler/clients/git/pktline"
"github.com/sourcegraph/go-vcsurl"
@@ -35,7 +36,7 @@ func (c *Client) Refs() (*Refs, error) {
}
if res.StatusCode >= 400 {
- return nil, &NotFoundError{c.url}
+ return nil, &common.ErrNotFound{c.url}
}
defer res.Body.Close()
@@ -150,14 +151,6 @@ func (c *Client) applyHeadersToRequest(req *http.Request, content *strings.Reade
}
}
-type NotFoundError struct {
- url string
-}
-
-func (e NotFoundError) Error() string {
- return e.url
-}
-
type Refs struct {
defaultBranch string
branches map[string]string