aboutsummaryrefslogtreecommitdiff
path: root/thp/errors.go
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2016-06-12 06:11:33 +0200
committerDimitri Sokolyuk <demon@dim13.org>2016-06-12 06:11:33 +0200
commit1a197f171413d85b04b2d48853acb594b345dbc5 (patch)
treeb510de6ff48f9f3a76e69f4c62b036a1fa9cef2b /thp/errors.go
parent1c73aa4b153812fbc64d98b609375cec617c073e (diff)
rename meta module
Diffstat (limited to 'thp/errors.go')
-rw-r--r--thp/errors.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/thp/errors.go b/thp/errors.go
new file mode 100644
index 0000000..33ae89f
--- /dev/null
+++ b/thp/errors.go
@@ -0,0 +1,14 @@
+package thp
+
+var ErrCodes = map[int]string{
+ 100: "Invalid request type: client request was not a HTTP GET",
+ 101: "Missing info_hash",
+ 102: "Missing peer_id",
+ 103: "Missing port",
+ 150: "Invalid infohash: infohash is not 20 bytes long",
+ 151: "Invalid peerid: peerid is not 20 bytes long",
+ 152: "Invalid numwant: client requested more peers than allowed by tracker",
+ 200: "info_hash not found in the database",
+ 500: "Client sent an eventless request before the specified time",
+ 900: "Generic error",
+}