Class: ErrorResponse

ErrorResponse(request, errorCodeopt, errorMessageopt)

ErrorResponse messages are sent by the DXL fabric itself or service instances upon receiving Request messages. The error response may indicate the inability to locate a service to handle the request or an internal error within the service itself. Error response messages are sent using the Client#sendResponse method of a client instance.

Constructor

new ErrorResponse(request, errorCodeopt, errorMessageopt)

Parameters:
Name Type Attributes Default Description
request Request

The Request message that this is a response for.

errorCode Number <optional>
0

The numeric error code.

errorMessage String <optional>

The textual error message.

Source:

Extends

Members

brokerIds :Array.<String>

The set of broker identifiers that the message is to be routed to. Setting this value will limit which brokers the message will be delivered to. This can be used in conjunction with Message#clientIds.

Type:
  • Array.<String>
Inherited From:
Default Value:
  • []
Source:

clientIds :Array.<String>

The set of client identifiers that the message is to be routed to. Setting this value will limit which clients the message will be delivered to. This can be used in conjunction with Message#brokerIds.

Type:
  • Array.<String>
Inherited From:
Default Value:
  • []
Source:

destinationTenantGuids :Array.<String>

The set of tenant identifiers that the message is to be routed to. Setting this value will limit which clients the message will be delivered to. This can be used in conjunction with Message#brokerIds and Message#clientIds.

Type:
  • Array.<String>
Inherited From:
Default Value:
  • []
Source:

destinationTopic :String

The topic to publish the message to.

Type:
  • String
Inherited From:
Source:

errorCode :Number

The numeric error code for the error response.

Type:
  • Number
Source:

errorMessage :String

The textual error message for the error response.

Type:
  • String
Source:

messageId :String

Unique identifier for the message (UUID).

Type:
  • String
Inherited From:
Source:

messageType :Number

The numeric type of the message.

Type:
  • Number
Overrides:
Default Value:
  • null
Source:

otherFields :Object

Returns an object containing the set of additional fields associated with the message. These fields can be used to add "header" like values to the message without requiring modifications to be made to the payload.

Type:
  • Object
Inherited From:
Default Value:
  • {}
Source:

payload :Buffer|String

The application-specific payload of the message.

Type:
  • Buffer | String
Inherited From:
Default Value:
  • ''
Source:

request :Request

The Request message that this is a response for.

Type:
Inherited From:
Source:

requestMessageId :String

Unique identifier (UUID) for the Request message that this message is a response for. This is used by the invoking Client to correlate an incoming Response message with the Request message that was initially sent by the client.

Type:
  • String
Inherited From:
Source:

serviceId :string

The identifier of the service that sent this response (the service that the corresponding Request was routed to).

Type:
  • string
Inherited From:
Source:

sourceBrokerId :string

The identifier of the DXL broker that the message's originating client is connected to (set by the initial broker).

Type:
  • string
Inherited From:
Default Value:
  • ''
Source:

sourceClientId :string

The identifier of the DXL client that sent the message (set by the broker that initially receives the message)

Type:
  • string
Inherited From:
Default Value:
  • ''
Source:

sourceTenantGuid :String

The tenant identifier of the DXL client that sent the message (set by the broker that initially receives the message).

Type:
  • String
Inherited From:
Default Value:
  • ''
Source:

version :Number

The version of the DXL message (used to determine the features that are available).

Type:
  • Number
Inherited From:
Default Value:
  • 2
Source: