diff options
-rw-r--r-- | client.go | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -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 |