SEMP Error Handling

In the case of a failed request, an HTTP error code is provided in the responseCode field of the meta section of the response. This value in itself does not provide any detail as to the reason for the failure, other than to blame the client (4xx) or server (5xx).

Further detail for the failure reason is provided by the returned error object, which includes a code, status, and description. Error codes are unique integers that enumerate the possible error conditions. The meaning of existing error codes will not change, but the set of error codes will grow over time and some codes may become obsolete. For readability, the event broker returns a short error status string and optional longer problem description along with the error code. These strings might change over time, so Solace recommends using them only for logging and debugging.

The following table lists some common error codes you may encounter:

Error Code Error Status Description

2

FAIL

General error code used for a variety of failure conditions. The description text will explain further actions that developers can take to resolve this condition.

6

NOT_FOUND

The Object or Parent Object being accessed does not exist.

11

INVALID_PARMETER

An attribute or a parameter that is unexpected is in the object.

14

NOT_SUPPORTED

Indicates a request or an attribute that is not supported.

27

PARSE_ERROR

There was an error in the HTML format of the request or the JSON content of the payload. See the description for further details on how to resolve this formatting error.

72

UNAUTHORIZED

The user does not have the sufficient access level required to perform the request.

89

NOT_ALLOWED

A request cannot be completed because the configuration of the broker is not in a state that could support the request.

228

MISSING_PARAMETER

Some attributes in the request are required to be in certain combinations with other attributes.

549

SEMP_RESPONSE_BUFFER_ALLOCATION_FAILED

The requested response is large and the event broker cannot allocate enough internal resources to buffer it. Use Paging to avoid excessively large responses that can result in this error.

Handling Future Error Codes

Over time the SEMP API will continue to evolve and introduce new, more specific error codes to make it easier for developers to understand and use SEMP. Your application should always maintain a default error handling condition that processes new codes to remain forward-compatible. Handling of the default condition should be similar to dealing with the generic fail condition.