monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Improving the note_netsync_* hooks for logging


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Improving the note_netsync_* hooks for logging
Date: Fri, 03 Nov 2006 13:02:10 -0600

On Wed, 2006-10-25 at 12:16 -0500, Timothy Brownawell wrote:
> On Wed, 2006-10-25 at 11:24 -0500, Matthew A. Nicholson wrote:

> > You could have also used errno style error codes, although HTTP codes 
> > are probably more widely known (maybe not).
> 
> Really, it's not just HTTP. There's also FTP and SMTP (and probably
> others?) that use similar kinds of 3-digit error codes. What I'm
> thinking here is that since the purpose of these is to allow for
> logging, it would be good to be more-or-less consistent with the kinds
> of error codes logged by other network services.
> 
> Of course, I've just looked briefly at online lists of those error
> codes, rather than digging up the RFCs that explain them. So, some of
> the numbers I picked probably aren't the best choice and should be
> changed.

After looking around a bit, here's what I'm thinking of. I've also
included (brief) descriptions of how HTTP/FTP/SMTP organize their error
codes.

This should show up on mainline in a day or two, after I get some tests
written and find where to put it in the documentation.



monotone
  xx0  all data transfer OK; connection closed successfully
  xx1  partial transfer (all to none, inclusive)
  xx2  no transfer

  2xx  no error (these don't get sent over the network)
  200  no error; connection closed normally
  21x  interrupted

  402  (generic) permissions error
  412  not permitted / not serving
  422  unknown key
  432  mixing versions (epoch mismatch)

  50x  (generic) protocol error
  512  request/role mismatch
  521  nonsensical command
  532  bad nonce/sig
  54x  data error (for when we make bad data not I() the server)


  const static int no_error = 200;
  const static int partial_transfer = 211;
  const static int no_transfer = 212;

  const static int not_permitted = 412;
  const static int unknown_key = 422;
  const static int mixing_versions = 432;

  const static int role_mismatch = 512;
  const static int bad_command = 521;

  const static int incorrect_identification = 532;
  //const static int bad_data = 541;


SMTP
  2xx  good
  4xx  persistent transient failure (network error?)
  5xx  permanent failure
  
  x0x  other/undefined
  x1x  addressing
  x2x  mailbox
  x3x  mail system
  x4x  network/routing
  x5x  delivery protocol
  x6x  message content
  x7x  security/policy

HTTP
  1xx  informational
  2xx  success
  3xx  redirection
  4xx  client error
  5xx  server error

FTP
  1xx  positive preliminary
  2xx  success
  3xx  positive intermediate
  4xx  transient negative (retry)
  5xx  permanent negative
  
  x0x  syntax
  x1x  info
  x2x  connections
  x3x  auth/accounting
  x4x  ???
  x5x  file system

-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]