The API response codes help you identify the results of your requests. The following
provides
reference information about the status codes and error messages that are used in the
REST APIs of
Trend Micro Email
Security.
Error response format
Each error response has a formatted body that consists of a status code and a
message.
The following is an example of an "HTTP 400 Bad Request" error:
{ "code": "InvalidMethod", "message": "The URL does not support the POST method." }
-
code
: designs the error handling logic. -
message
: displays human-readable error information. In the preceding example, the HTTP request failed because this resource does not support the POST method.
Error codes
The following table describes common error codes and error messages for each supported
HTTP
response status.
HTTP Status Code
|
Error Code
|
Error Message
|
Description
|
400
|
InvalidMethod
|
The URL does not support the ${method} method.
|
Some resources support the GET method only. If any other method is requested, this
error
code will be returned.
|
400
|
InvalidFormat
|
Invalid request format.
|
The content in the request cannot be converted into a proper format.
|
400
|
IllegalCharacter
|
Illegal characters found in ${param}.
|
Some illegal characters exist in the request.
|
401
|
AuthenticationMissingOrInvalid
|
The credential is missing or invalid.
|
No authentication header or invalid authentication header is found in the HTTP request.
|
403
|
AuthorizationRequestDenied
|
The ${account} account is not authorized to perform this operation.
|
The request was denied due to insufficient privileges. For example, a non-administrative
account does not have the permission to delete resources.
|
404
|
ResourceNotAvailable
|
The resource requested by the ${account} account is not available.
|
The resource requested by the account is not available. For example, the account is
attempting to retrieve logs via REST API while the Log Retrieval feature is not enabled.
|
500
|
InternalServerError
|
Internal server error.
|
The internal server encountered an unexpected error while processing the request.
|