REST API HTTP Status Codes and Error Messages Reference

This section provides information about the status codes and error messages that can be received by a REST API client of Oracle Messaging Cloud Service.

Topics:

Generic Meanings of HTTP Response Status Codes

The following table lists HTTP response status codes and their meanings:

Response Status Code Meaning

200 Ok

Successful requests other than creations and deletions.

201 Created

Successful creation of a queue, topic, temporary queue, temporary topic, session, producer, consumer, listener, queue browser, or message.

204 No Content

Successful deletion of a queue, topic, session, producer, or listener.

400 Bad Request

The path info doesn't have the right format, or a parameter or request body value doesn't have the right format, or a required parameter is missing, or values have the right format but are invalid in some way (for example, destination parameter does not exist, content is too big, or client ID is in use).

403 Forbidden

The invoker is not authorized to invoke the operation.

404 Not Found

The object referenced by the path does not exist.

405 Method Not Allowed

The method is not one of those allowed for the path.

409 Conflict

An attempt was made to create an object that already exists.

500 Internal Server Error

The execution of the service failed in some way.

Response bodies for status codes greater than or equal to 400 are either empty or contain an error response in JSON or XML format. For more information, see Understanding Error Responses.

Error Keys, Status Codes and Error Messages

This section gives a list of the distinct error responses that can be generated by the REST API.

Topics:

The error responses are listed first by their associated HTTP status code. Within each status code, the error responses are listed by their key. The error key is the last component of the error code returned in the response. That is, each error code has the form:

urn:oracle:cloud:errorcode:messaging:error key

For example, the error with key methodNotAllowed has error code urn:oracle:cloud:errorcode:messaging:methodNotAllowed.

For each error key, we give the associated error message followed by further explanation if the error message is not self-explanatory.

Errors with HTTP Status Code 400 (Bad Request)

This section provides information about errors with HTTP status code 400.

Error Message Description
badAntiCsrf

Missing or incorrect X-OC-ID-TOKEN.

The anti-CSRF token is enabled, but the request either did not submit the token in header X-OC-ID-TOKEN or submitted a value that does not match the previously generated value.

badContentType

Content-Type must be one of the following: list of media types.

The method and URL path must have content of a particular media type in its body, and the Content-Type header does not match any of the expected media types.

badParameter

Bad parameter 'query string parameter'/header 'header name': 'parameter value'.

The value submitted for a parameter is malformed (for example, it should be an integer but doesn't parse as an integer, or should specify a destination but doesn't start with /queues/ or /topics/), not in the proper range (for example, a timeout that parses as an integer but is 0 or negative), or has some other syntactic problem. This error does not indicate that the value is well-formed but, for example, refers to an entity that doesn't exist. The error message specifies the parameter, giving both the query string parameter and header names, and the bad value.

badProperty

Bad property header 'header name' with value 'value'.

The value submitted for a message property via an X-OC-type-PROPERTY-name header is malformed. The error message specifies the header and value.

badSelector

Bad selector: 'selector'.

A message selector was found to be invalid.

clientIdFailure

Client ID 'client ID' is invalid or in use by a client or listener.

A client ID was submitted that is invalid or is already in use, either by a listener, another client, or by the current client.

clientIdUnsettable

Connection state does not allow setting client ID.

The client attempted to set a client ID on the connection after performing an operation that puts the connection in a state where its client ID is no longer settable. This includes creating a session and any other (successful) operation that requires the prior creation of a session.

connectionParameterNotFound

Connection 'connection name' does not exist.

The client attempted to create a session with a connection name that is not the name of an existing connection.

destinationParameterNotFound

Destination 'destination name' of type 'queue or topic' does not exist.

A queue or topic submitted in the request does not exist. This key is used when the destination is not the resource specified in the URL path, but rather when it is specified as, for example, a destination parameter or X-OC-DESTINATION header.

disallowedSubscriptionLookup

Disallowed combination of parameters: submitted parameters.

The method to list durable subscriptions and their properties specified a combination of parameters that is not one of the supported combinations. The error message will give a space-delimited list consisting of some collection of the strings subscriptionName, clientId, and topicName.

durableSubscriberOnTemporaryTopic

A consumer cannot be created on a temporary topic.

An attempt was made to create a consumer on a temporary topic that uses a durable subscription. Durable subscriptions are not allowed on temporary topics.

forbiddenContentType

The Content-Type header has value 'Content-Type value', which is not allowed for the requested operation.

A send request was made whose Content-Type header had value application/x-www-form-urlencoded. This content type is not allowed in send requests, as the combination of the POST method and this content type may cause the web server to consume the content, attempting to parse it as if it were a <form> submission from an HTML browser, making the content unavailable to be put into the message.

forbiddenParameter

Parameter 'query string parameter'/header 'header name' not allowed with method 'method' on path 'URL path'.

A parameter was submitted that is not allowed with a given method and URL path. The error message gives both the query string parameter and the header name for the parameter.

incompleteGroupProperties

Exactly one of the JMSXGroupID and JMSXGroupSeq properties was set on the message. Either both properties must be set, or neither must be set.

One of the mandatory parameters was not set when sending messages using message groups.

invalidPath

Invalid path: 'URL path'.

The URL path of a request is not a supported path or is malformed. Specific problems include the following:

  • The URL does not contain the path component for the service name and identity domain name.

  • The component of the request path after the service name/identity domain name component is not one of those handled by the service.

  • Some path component after the service and identity domain names contains characters other than a-z, A-Z, decimal digits, or underscores ('_').

localModeNonTopic

Local mode on non-topic.

A request specified a local mode (whether messages sent to a destination via this connection should be received by consumers on this connection) with a destination that is not a topic (in which case a local mode is not appropriate).

malformedAcceptHeader

Invalid Accept header: 'Accept header'.

The service was unable to process the Accept header of a request to determine whether the client can accept a response with content of a given media type.

malformedDestination

Malformed destination: 'destination'.

A destination specification did not have the proper syntax (for example, it did not start with one of the following forms):
  • /queues/

  • /topics/

  • /temporaryQueues/

  • /temporaryTopics/

malformedListener

The XML for the message push listener is malformed; the malformed XML is as follows: 'listener XML'.

The message push listener specification did not have the proper syntax.

For examples of well-formed XML and the proper syntax to use, see Create a Listener.

maxConnectionsReached

The attempted operation could not be completed because the service instance is currently using all of its 'maximum number of concurrent connections' available connections.

An operation has been attempted that would create a new JMS connection (sending a message, receiving a message, setting the client ID on an connection, and so on), and the service instance is already at the maximum number of concurrent connections it's allowed.

maxDurableSubscriptionsReached

The requested durable subscription could not be created because the service instance has reached its maximum number of durable subscriptions. This service instance may have no more than 'maximum number of durable subscriptions' durable subscriptions.

Self-explanatory.

maxLocalConnectionsReached

The attempted operation could not be completed because the service instance may have exceeded its available connections.

The service instance has exceeded the number of connections it can create on a single virtual machine in the cloud. This usually means that the service instance has reached, or even gone beyond, the maximum number of allowed connections.

maxMessagesOnTargetDestinationReached

The message could not be sent because the targeted destination reached its maximum number of messages. Each destination on this service instance may not have more than 'hard quota on number of messages' messages. The number of messages is currently 'current backlog size'. The number of messages must drop below 'soft quota on number of messages' before further sends are allowed.

Self-explanatory.

maxMessageBytesOnTargetDestinationReached

The message could not be sent because the targeted destination reached its maximum number of bytes of messages. Each destination on this service instance may not have more than 'hard quota on bytes' bytes of messages. The number of bytes of messages is currently 'current backlog bytes'. The number of bytes of messages must drop below 'soft quota on bytes' before further sends are allowed.

Self-explanatory.

maxQueuesReached

The requested queue could not be created because the targeted service instance has reached its maximum number of queues. This service instance may have no more than 'maximum number of queues' queues.

Self-explanatory.

maxTempDestinationsOnConnectionReached

The requested temporary destination could not be created because the targeted service instance has reached its maximum number of temporary destinations for this connection. Each connection on this service instance may not have more than 'maximum number of temporary destinations' temporary destinations.

Self-explanatory.

maxTopicsReached

The requested topic could not be created because the service instance has reached its maximum number of topics. This service instance may have no more than 'maximum number of topics' topics.

Self-explanatory.

messageHeadersTooLarge

The size of the messaging-relevant headers of the send request exceeded the maximum, maximum header size.

The request's message-relevant headers exceeded the maximum size.

messageBodyTooLarge

The size of the body of the send request exceeded the maximum, maximum body size.

The request's body exceeded the maximum size.

messageTotalTooLarge

The internal message representation has size internal size, which exceeds the maximum internal size, maximum internal size.

A message whose headers and body were within the limitations exceeded the JMS broker's threshold for the size of the internal representation of a message.

messagePushListenerVerificationBadResponse

Verification that the endpoint '<URL of an HTTP/S endpoint>' is willing to receive messages failed. The endpoint's response body did not match the challenge token.

An HTTP or HTTPS endpoint responded to a verification request with a response body that did not match the challenge token sent by Oracle Messaging Cloud Service.

messagePushListenerVerificationConnectionFailed

Verification that the endpoint '<URL of an HTTP/S endpoint>' is willing to receive messages failed. The service instance could not connect to the endpoint.

Oracle Messaging Cloud Service was unable to connect to an HTTP or HTTPS endpoint to send a verification request.

messagePushListenerVerificationErrorResponse

Verification that the endpoint '<URL of an HTTP/S endpoint>' is willing to receive messages failed. The endpoint's response had status <non-200 status>.

An HTTP or HTTPS endpoint responded to a verification request with a status code other than 200.

messagePushListenerVerificationException

Verification that the endpoint '<URL of an HTTP/S endpoint>' is willing to receive messages failed. An exception occurred in attempting to read the response.

An exception occurred in attempting to read the response to a verification request.

messagePushListenerVerificationNoToken

The message push listener had an HTTP/S target, but no verification token was supplied.

The listener XML specifies at least one HTTP or HTTPS URL to which to push messages, but no verificationToken was supplied.

missingParameter

Missing parameter 'query string parameter'/header 'header name'.

A parameter that is required for the method and URL path of the request was not supplied, either as a query string parameter or a header. The error specifies the query string parameter and header name for the missing parameter.

multipleDestinations

No destination or multiple destinations specified.

A send via a producer was requested, but either the request specified no destination and the producer had no default destination or the request specified a destination and the producer had a default destination.

noContentType

No Content-Type.

A request was made that must have a specific media type, but no Content-Type header was supplied.

noDestinationForConsumer

Neither a destination nor a subscription name were specified.

A request was made to create a consumer, but no destination was specified, and no existing durable subscription (from which a destination could be extracted) was specified.

nonexistentNamespace

Nonexistent namespace: 'namespace identifier'.

The namespace (specified by a service name and an identity domain name) specified for the request did not exist.

nonexistentNamespaceComponents

There is no service instance with service name 'service name' and identity domain name 'identity domain name'.

The namespace specified for the request did not exist.

nonexistentNamespaceUnknown

There is no service instance with the specified service and identity domain name.

The namespace specified in the request URL did not exist.

serviceInstanceChanged

The client has attempted to use the service instance 'first path component' with a messaging context that was started with service instance 'original first path component'.

The client request that created the current messaging context specified a service instance by using a URL path whose first component had the form

service name of the instance-identity domain name of the instance

but the current request has supplied a different first component on its URL path. The service instance may not be changed for a given messaging context. If a REST client wishes to access multiple service instances simultaneously, it must use multiple messaging contexts with different JSESSIONID values.

sessionParameterNotFound

Session 'session name' does not exist.

This error is generated when a nonexistent session is specified as a query string parameter or a header, rather than via the URL path.

subscriptionInUse

The durable subscription with client ID 'client ID' and name 'subscription name' has a consumer on it.

This error is generated in two circumstances:
  • An attempt is made to create a consumer on a durable subscription when that durable subscription already has a consumer on it.

  • An attempt is made to delete a durable subscription that has a consumer on it.

subscriptionNonTopic

Durable subscription on non-Topic.

An attempt has been made to create a consumer with a durable subscription with a specified destination that is not a topic. This error is generated when it is possible to determine from the request alone that the destination is not a topic (for example, if the parameter specifying the consumer starts with /queues/).

subscriptionNotFoundNoInfo

Durable subscription does not exist.

A durable subscription was not found, but no information about that durable subscription was available.

subscriptionParameterNotFound

Durable subscription with client ID 'client ID' and name 'subscription name' does not exist.

This error is generated when the nonexistent subscription is specified as a query string parameter or a header, rather than via the URL path.

timeoutTooLarge

Receive timeout (requested timeout milliseconds) is larger than the maximum allowed (service maximum timeout milliseconds).

The value of the timeout parameter was larger than the maximum allowed value (5 minutes).

timeToLiveTooLarge

Time to live (requested time-to-live milliseconds) is larger than the maximum allowed (service maximum time-to-live milliseconds).

A requested time-to-live, either for a producer being created, a producer being modified, or a message being sent, is longer than the maximum allowed (2 weeks).

Errors with HTTP Status Code 403 (Forbidden)

This section provides information about errors with HTTP status code 403.

Error Message Description
adminRequired

Administrator authorization required.

Self-explanatory.

noRoles

User must be either messaging worker or messaging admin.

The user has authenticated, but has neither of the roles (Messaging Administrator or Messaging Worker) required for any of the messaging operations.

Errors with HTTP Status Code 404 (Not Found)

All errors in this category are returned when a resource specified on the URL path does not exist.

Error Message Description
connectionNotFound

Connection 'connection name' does not exist.

Self-explanatory.

consumerNotFound

Consumer 'consumer name' does not exist.

Self-explanatory.

destinationNotFound

Destination 'name' of type 'queue or topic' does not exist.

Self-explanatory.

listenerNotFound

Message push listener 'listener name' does not exist.

Self-explanatory.

producerNotFound

Producer 'producer name' does not exist.

Self-explanatory.

queueBrowserNotFound

Queue browser 'queue browser name' does not exist.

Self-explanatory.

sessionNotFound

Session 'session name' does not exist.

Self-explanatory.

subscriptionNotFound

Durable subscription with name 'subscription name' does not exist.

An attempt has been made to delete a nonexistent subscription via a session.

subscriptionNotFoundFull

Durable subscription with client ID 'client ID' and name 'subscription name' does not exist.

As attempt has been made to retrieve the properties of a nonexistent durable subscription.

Errors with HTTP Status Code 405 (Method Not Allowed)

This section provides information about errors with HTTP status code 405.

Error Message Description
methodNotAllowed

Method 'method' not allowed on path 'URL path'.

Self-explanatory.

Errors with HTTP Status Code 406 (Not Acceptable)

This section provides information about errors with HTTP status code 406.

Error Message Description
unacceptable

Client's Accept header 'Accept header' cannot accept any of the following content types: space-separated list of content types.

Self-explanatory.

Errors with HTTP Status Code 409 (Conflict)

This section provides information about errors with HTTP status code 409.

Error Message Description
connectionAlreadyExists

Connection 'connection name' already exists.

Self-explanatory.

consumerAlreadyExists

Consumer 'consumer name' already exists.

Self-explanatory.

destinationAlreadyExists

Destination 'destination name' of type 'queue or topic' already exists.

Self-explanatory.

listenerAlreadyExists

Message push listener 'listener name' already exists.

Self-explanatory.

producerAlreadyExists

Producer 'producer name' already exists.

Self-explanatory.

queueBrowserAlreadyExists

Queue browser 'queue browser name' already exists.

Self-explanatory.

sessionAlreadyExists

Session 'session name' already exists.

Self-explanatory.

subscriptionAlreadyExists

A durable subscription with client ID 'client ID' and name 'subscription name' already exists.

Self-explanatory.

Errors with HTTP Status Code 500 (Internal Server Error)

This section provides information about errors with HTTP status code 500.

Error Message Description
failedGetConnectionProps

Failed to get Connection properties.

A failed attempt was made to get properties related to connections to the JMS broker.

failedGetDestinationConnectionProps

Failed to get connection properties for destination 'destination name' of type 'queue or topic'.

A failed attempt was made to get properties related to connections to the JMS broker for a specific destination.

failedGetDestinationProps

Failed to get properties for destination 'destination name' of type 'queue or topic'.

A failed attempt was made to get properties related to a specific destination.

failedGetServiceProps

Failed to get Service properties.

A failed attempt was made to get properties related to a specific service instance.

maxConnectionCountUnavailable

The maximum number of connections allowed for the service instance cannot be determined.

An internal error has occurred in determining the number of connections that a service instance is allowed.

messagePushListenersInterrupted

Message push listener functionality was unexpectedly interrupted. Please try again.

Self-explanatory.

messagePushListenerVerificationRedirectionDisableFailed

A failed attempt was made to disable HTTP redirects for the message push listener verification request.

operationFailed

Operation failed.

A low-level failure occurred in attempting to carry out the latest request.