Error Codes

Error Codes
lac42
The following is a list of known error conditions in
Layer7 Live API Creator
:
errorCode 4001
Error code 4001 indicates that the HTTP request was rejected. The error typically occurs because it was malformed or it did not include the required information.
For example, when doing a PUT or DELETE, if the checksum is not found, this error is returned. The missing piece is identified in the error message.
errorCode 4011
Status code
: 401
Error code
: 4011
Error code 4011 indicates that the request did not include proper authorization. API users require authentication tokens to call APIs.
For more information about how to specify an authentication token on API calls, see Obtain and Use Authentication Tokens.
errorCode 4012
Status code:
401
Error code
: 4012
Error code 4012 indicates that the server was not able to use the provided API key. The message contains additional information, for instance, the URL may point to a non-existing account or project.
To resolve this error, check the URL that you are using, and ensure that it follows the format:
http://<server-name>/rest/<account-name>/<project-name>/<api-version>/<resource-name>
For example:
http://localhost:8080/rest/testclient/demo/v1/customer
errorCode 4031
Error code 4031 indicates that the request tried to access a resource to which it does not have access. The resources that you can access are determined by the API key that you use in the request. When the request comes in, the following occurs:
  1. The API key is authenticated.
  2. The default permissions for the API key are determined. API keys can have some types of access by default to all resources, unless specified otherwise in the roles.
  3. The roles that are assigned to the API key are retrieved.
  4. The permissions for each role are added to the set.
  5. The server determines whether the request is allowed. If not, it sends back error code 4031. If you are not supposed to have access to this resource, then the request ends.
If you believe you should have access to this resource, then ask the project administrator to give you API key-sufficient privileges to access this resource in the desired way.
errorCode 4032
Error code 4032 indicates that the request was made to a resource to which it does not have access to some of the resource's attributes. This error can often be caused by calling a resource to which you are not authorized to call or your authentication token has restricted access to the resource.
errorCode 4034
Error code 4034 indicates that you are attempting to access a disabled API. Disabled APIs are blocked from incoming requests. You can enable your API using API Creator or using the command line utilities.
For more information about how to enable your API using API Creator, see API Properties.
errorCode 4035
Error code 4035 indicates that you have not defined an authentication provider for your API. Authentication providers are optional. Instead, API users can use an API by way of an authentication token that you create using API Creator.
errorCode 4036
Error code 4036 indicates that your authentication token has expired, is disabled, or cannot be found.
errorCode 4040
Status code:
404
Error code
: 4040
Error code 4040 indicates that the URI you tried to reach is unknown.
errorCode 4042
Error code 4042 indicates that you made a request for a non-existent resource. This error is often caused by a passing in a misspelled or incorrectly cased resource name to the request. Resource names are case-sensitive.
errorCode 4044
Error code 4044 indicates that you made a request to a non-existent resource. This error can often be caused by calling a resource to which you are not authorized to call. 
errorCode 4045
Error code 4045 indicates that you tried to update an object that does not exist or that no longer exists. This error can happen if you are trying to update a single object or an object as part of a resource.
Layer7 Live API Creator
 rolls back the transaction when this error occurs, therefore no persistent change is done.
errorCode 5004
Error code 5004 indicates that something has gone wrong on the server. This error is typically due to some error condition. The additional information that is provided in the error message provides more details on the exact nature of the problem.
errorCode 40012
Status code:
400
Error code:
40012
Error code 40012 indicates that you made a request to insert a new object that did not include a value for a required attribute.
Verify the JSON that you sent to the server.
errorCode 40024
Error code 40024 indicates that you made a REST call using the HTTP as its protocol call instead of HTTPS.
To resolve this error, complete one of the following:
  • Change your REST call to use HTTPS as its protocol.
  • If you control the API, allow all API calls using HTTP and HTTPS.
    For more information about how to allow all API calls using HTTP and HTTPS, see API Properties.
errorCode 40025
Error code 40025 indicates that the JSON sent to the server contained an unexpected attribute.
Attribute names are case-sensitive. The error message indicates which attribute was rejected.
errorCode 40026
Error code 40026 indicates that the JSON payload, which was sent as part of a POST or PUT, contains one or more attributes that was deemed invalid, either because it was specified more than once, or because its value was not parsable. Verify that your JSON payload is valid. The error message points out exactly which attribute is a problem.
errorCode 40032
Error code 40032 indicates that you have called a function without passing in all of the required parameters.
errorCode 40033
Error code 40033 means that you have called a function with parameters using incorrect data type.
errorCode 50029
Error code 50029 means that there is a logic execution error within the rule that is called.
errorCode 50033
Error code 50033 indicates that the user has a role which requires a security global that has not been set.
The security administrator must set up a security variable (as indicated in the error message) by editing either the user or the API key.
errorCode 50045
Error code 50045 indicates that you have called a function that is associated to a table or resource to which you are not authorized to call or your authentication token has restricted access to the resource.
errorCode 50052
Error code 50052 means that a validation rule has failed. 
Layer7 Live API Creator
 checks the validation rule any time the relevant data has changed. If the rule is violated, then the request fails with this error code.
If you have admin access to this API, and you did not expect this behavior, verify why the validation rule failed by checking the rule definition. If you do not have admin access to this API, contact the API developer for this API. Verify the purpose of the validation rule and what to do to avoid this error.
For more information about validation rules, see Validation Rule Type.
errorCode 50056
Error code 50056 indicates that a count has tried to become less than zero. Counts becoming less than zero is logically impossible. This situation can happen in the following cases:
  • The count column is out of date. 
    If, for instance, you have added child rows using SQL, or somehow bypassing
    Layer7 Live API Creator
    , the count does not reflect the actual number of children in the database. If you then update or delete children, you might get to a point where the count is decremented below zero, at which point this error occurs.
    To correct this situation, update your database so that the count column reflects the child rows that are present in the database.
  • The count qualification is time-dependent. 
    If the qualification for the count can change value depending on when it is evaluated, the count might become incorrect. This type of qualification is not supported because it creates logical contradictions.
    To correct this situation, rethink your model. A common solution consists of having a parent object per day, for instance, and to use the insert-parent-if-none pattern.
errorCode 50060
This error indicates that you attempted to sort the results of a query using a column that cannot be used for sorting.
This typically means that the column in question is potentially large or binary.
errorCode 50061
Error code 50061 indicates that you attempted to insert or update too much data into a column. This error can happen, for instance, if a column is defined as VARCHAR(100) and you try to put more than 100 characters in it.
In some databases, a character can sometimes take more than one byte. For example, a column with 100 bytes of storage might be able to accommodate fewer than 100 characters.
errorCode 50081
Error code 50081 indicates that you attempted to call a POST, PUT, or DELETE on a table-based resource that is connected to the database using a data source defined using the Data Source Providers framework.