Jdesk / memcached

Automatically exported from code.google.com/p/memcached
0 stars 0 forks source link

Inconsistent use of ERROR and CLIENT_ERROR #103

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
According to protocol.txt the following strings are used for errors:
- "ERROR\r\n"

  means the client sent a nonexistent command name.

- "CLIENT_ERROR <error>\r\n"

  means some sort of client error in the input line, i.e. the input
  doesn't conform to the protocol in some way. <error> is a
  human-readable error string.

I would like to replace ERROR with CLIENT_ERROR and give better error
messages. Why? Both are client errors and I don't see why the first one
couldn't be:

CLIENT_ERROR unknown command.

The title of this bug report is inconsistent use, and by that I mean that
the server will return ERROR unless you get the command name and the number
of arguments right. That isn't much help to the poor user trying to type in
a command on the wire. If it is able to detect the command name it should
return the correct format of the command instead of just sending ERROR. Ex:

CLIENT_ERROR Syntax error: cas <key> <flags> <exptime> <bytes> <casid>
[noreply]\r\n

Original issue reported on code.google.com by trond.no...@gmail.com on 28 Oct 2009 at 11:06

GoogleCodeExporter commented 9 years ago
seconded.

Original comment by webb.cl...@gmail.com on 28 Oct 2009 at 1:30

GoogleCodeExporter commented 9 years ago
closing old issues.

Original comment by dorma...@rydia.net on 5 Jul 2015 at 1:36