forked from cavaliergopher/grab
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherror.go
More file actions
28 lines (21 loc) · 1.06 KB
/
error.go
File metadata and controls
28 lines (21 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package grab
import "errors"
var (
// ErrBadStatusCode indicates that the server response had a status code that
// was not in the 200-299 range.
ErrBadStatusCode = errors.New("server returned a non-2XX status code")
// ErrBadLength indicates that the server response or an existing file does
// not match the expected content length.
ErrBadLength = errors.New("bad content length")
// ErrBadChecksum indicates that a downloaded file failed to pass checksum
// validation.
ErrBadChecksum = errors.New("checksum mismatch")
// ErrNoFilename indicates that a reasonable filename could not be
// automatically determined using the URL or response headers from a server.
ErrNoFilename = errors.New("no filename could be determined")
// ErrNoTimestamp indicates that a timestamp could not be automatically
// determined using the reponse headers from the remote server.
ErrNoTimestamp = errors.New("no timestamp could be determined for the remote file")
// ErrFileExists indicates that the destination path already exists.
ErrFileExists = errors.New("file exists")
)