3.4.1.4 Message: ProtocolException

Topic Version1Published10/31/2016
For StandardETP v1.1

Used to indicate an error condition in a protocol. This message MUST NOT be used to indicate general failures of low-level protocols (such as WebSocket, HTTP, or TCP/IP) on which the Energistics Transfer Protocol depends. A given protocol may dictate that error information is sent as a stand-alone message, or may also define situations where error information is sent embedded in another message.

The correlationId in the message header must be the ID of the message that generated the exception and the protocol in the header will be the protocol of that message, not necessarily 0.

See Appendix A for a list of defined error codes.

Message Type ID: 1000

Correlation Id Usage:

MUST contain the message id of the message that caused the exception to be raised.

Multi-part: False

Sent by: *

Attribute

Description

Data Type

Min

Max

errorCode

Unique number, defined by this specification, for an error. Error numbers are defined separately for each subprotocol, thus to unambiguously identify an error message, you must combine the ProtocolID and the errorCode.

int

1

1

errorMessage

A string representation of the error message.

string

1

1

Avro Source

{

      "type": "record",

      "namespace": "Energistics.Protocol.Core",

      "name": "ProtocolException",

      "messageType": "1000",

      "protocol": "0",

      "senderRole": "*",

      "protocolRoles": "client,server",

      "fields":

     [

         { "name": "errorCode", "type": "int" },

         { "name": "errorMessage", "type": "string" }

     ]

}