mercurial/help/internals/wireprotocol.txt
changeset 37726 0c184ca594bb
parent 37725 3ea8323d6f95
child 39458 dc61a67c1fc0
equal deleted inserted replaced
37725:3ea8323d6f95 37726:0c184ca594bb
   686    End of data. When set, the response data has been fully sent and
   686    End of data. When set, the response data has been fully sent and
   687    no additional frames for this response will be sent.
   687    no additional frames for this response will be sent.
   688 
   688 
   689 The ``0x01`` flag is mutually exclusive with the ``0x02`` flag.
   689 The ``0x01`` flag is mutually exclusive with the ``0x02`` flag.
   690 
   690 
   691 Error Response (``0x05``)
   691 Error Occurred (``0x05``)
   692 -------------------------
   692 -------------------------
   693 
   693 
   694 An error occurred when processing a request. This could indicate
   694 Some kind of error occurred.
   695 a protocol-level failure or an application level failure depending
   695 
   696 on the flags for this message type.
   696 There are 3 general kinds of failures that can occur:
   697 
   697 
   698 The payload for this type is an error message that should be
   698 * Command error encountered before any response issued
   699 displayed to the user.
   699 * Command error encountered after a response was issued
   700 
   700 * Protocol or stream level error
   701 The following flag values are defined for this type:
   701 
   702 
   702 This frame type is used to capture the latter cases. (The general
   703 0x01
   703 command error case is handled by the leading CBOR map in
   704    The error occurred at the transport/protocol level. If set, the
   704 ``Command Response`` frames.)
   705    connection should be closed.
   705 
   706 0x02
   706 The payload of this frame contains a CBOR map detailing the error. That
   707    The error occurred at the application level. e.g. invalid command.
   707 map has the following bytestring keys:
       
   708 
       
   709 type
       
   710    (bytestring) The overall type of error encountered. Can be one of the
       
   711    following values:
       
   712 
       
   713    protocol
       
   714       A protocol-level error occurred. This typically means someone
       
   715       is violating the framing protocol semantics and the server is
       
   716       refusing to proceed.
       
   717 
       
   718    server
       
   719       A server-level error occurred. This typically indicates some kind of
       
   720       logic error on the server, likely the fault of the server.
       
   721 
       
   722    command
       
   723       A command-level error, likely the fault of the client.
       
   724 
       
   725 message
       
   726    (array of maps) A richly formatted message that is intended for
       
   727    human consumption. See the ``Human Output Side-Channel`` frame
       
   728    section for a description of the format of this data structure.
   708 
   729 
   709 Human Output Side-Channel (``0x06``)
   730 Human Output Side-Channel (``0x06``)
   710 ------------------------------------
   731 ------------------------------------
   711 
   732 
   712 This frame contains a message that is intended to be displayed to
   733 This frame contains a message that is intended to be displayed to