aboutsummaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-11-07 22:58:35 +0000
committerNick Mathewson <nickm@torproject.org>2004-11-07 22:58:35 +0000
commitc514a066636ab3172cc1553ad5acfafa28bcecf7 (patch)
tree89936a67556b1af44e6165628f03dc2512decd70 /doc
parent0059ee5feaca42d5675957bdbaa467f6b7dd5bc0 (diff)
downloadtor-c514a066636ab3172cc1553ad5acfafa28bcecf7.tar
tor-c514a066636ab3172cc1553ad5acfafa28bcecf7.tar.gz
Fix up error codes
svn:r2706
Diffstat (limited to 'doc')
-rw-r--r--doc/control-spec.txt39
1 files changed, 33 insertions, 6 deletions
diff --git a/doc/control-spec.txt b/doc/control-spec.txt
index 1dfb417ef..63b5a0a31 100644
--- a/doc/control-spec.txt
+++ b/doc/control-spec.txt
@@ -50,16 +50,43 @@ the message.
The body of the message begins with a 2-byte error code. The following
values are defined:
+
0x0000 Unspecified error
- 0x0001 Unrecognized message type
- 0x0002 Unrecognized configuration key
- 0x0003 Invalid configuration value
- 0x0004 Unrecognized event code
- 0x0005 Unauthorized user
- 0x0006 Failed authentication attempt
+ []
+
+ 0x0001 Internal error
+ [Something went wrong inside Tor, so that the client's
+ request couldn't be fulfilled.]
+
+ 0x0002 Unrecognized message type
+ [The client sent a message type we don't understand.]
+
+ 0x0003 Syntax error
+ [The client sent a message body in a format we can't parse.]
+
+ 0x0004 Unrecognized configuration key
+ [The client tried to get or set a configuration option we don't
+ recognize.]
+
+ 0x0005 Invalid configuration value
+ [The client tried to set a configuration option to an
+ incorrect, ill-formed, or impossible value.]
+
+ 0x0006 Unrecognized event code
+ [The client tried to set an event code that we don't recognize.]
+
+ 0x0007 Unauthorized.
+ [The client tried to send a command that requires
+ authorization, but it hasn't sent a valid AUTHENTICATE message.]
+
+ 0x0008 Failed authentication attempt
+ [The client sent a well-formed authorization message.]
The rest of the body should be a human-readable description of the error.
+ In general, new error codes should only be added when they don't fall under
+ one of the existing error codes.
+
3.2. DONE (Type 0x0001)
Sent from server to client in response to a request that was successfully