Skip to main content
Skip table of contents

Error Messages

The Aqilla API may issue the following error messages which your application must be corrected to eliminate or otherwise handle. This is not an exhaustive list but it is indicative.

Common Error messages

Incorrect Credentials

Status401: Not Authorized

Incorrect View Name in URL
Status 404: Not Found

XML
<?xml version="1.0" encoding="UTF8"
standalone="yes"?>
<dataretrieval>
<error>
<message>Unknown view: 'Supplier'</message>
</error>
<entities/>
</dataretrieval>

User Does Not Have Access to Module
Status 404: Not Found

XML
<?xml version="1.0" encoding="UTF8"
standalone="yes"?>
<dataretrieval>
<error>
<message>Unknown Tab: 'Reference'</message>
</error>
<entities/>
</dataretrieval>

Badly Formed XML e.g. missing closing tag
Status 500: Internal Server Error

XML
<?xml version="1.0" encoding="UTF8"
standalone="yes"?>
<serviceerrors>
<error>
<message>javax.xml.bind.UnmarshalException with
linked exception: [org.xml.sax.SAXParseException:
XML document structures must start and end within the same entity.]</message>
</error>
</serviceerrors>

Fails Validation in Aqilla
Status: 400 Bad Request

XML
<?xml version="1.0" encoding="UTF8"
standalone="yes"?>
<dataentry>
<entity>
<error attributeName="Customer Code">
<message>Value 'BPX001'is incorrect or object with value 'BPX001' does not exist</message>
</error>
</entity>
<subordinates/>
</dataentry>


Handling errors

Most responses will be returned in JSON format, although occasionally plain text, XML or even HTML content may be returned, with the corresponding Content-Type header.

Clients should normally analyse both the response code and body of JSON and plain text responses and analyse only response code in all other cases.

Scenario

Response

Response Body

Comment

X-Aqilla-QAPI-version is not N.M format (N and M are integers)

400 Bad Request

CODE
{   
"code": "API_VERSION_FORMAT_ERROR" 
}

X-Aqilla-QAPI-version too high or too low

400 Bad Request

{

"code": "API_VERSION_NOT_SUPPORTED"

}

In the versions 0.x, the value of this header is ignored.

Invalid request body (JSON syntax error)

400 Bad Request

Plain text with various error messages

locatorType missing or invalid

400 Bad Request

{

"code": "INVALID_REQUEST",

"message": "One or more fields are invalid or missing",

"parameters": [

{

"name": "field",

"value": "locatorType"

}

]

}

Invalid request body (JSON syntax error)

400 Bad Request

Plain text with various error messages

Query Profile not found

400 Bad Request

CODE
{   
"code": "PROFILE_NOT_FOUND" 
}

Not all required parameters are passed, including the case with required parameters passed with null values.

400 Bad Request

{

"code": "PARAMETERS_INCOMPLETE",

"message": "One or more query parameters are missing",

"parameters": [

{

"name": "parameter",

"value": "name-of-problematic-parameter-here"

}

]

}

The response contains an array of problematic parameters.

One or more unknown parameters found

400 Bad Request

 {

"code": "PARAMETERS_UNKNOWN",

"message": "One or more query parameters are unknown",

"parameters": [

{

"name": "parameter",

"value": "a"

}

]

}

The response contains an array of problematic parameters.

Parameter value failed validation (min/max, minLengh/maxLength, regex) 

400 Bad Request

{

"code": "PARAMETER_VALIDATION_ERROR",

"message": "Query parameter not valid",

"parameters": [

{

"name": "violation",

"value": "MaxLength"

},

{

"name": "parameter",

"value": "accountCode"

},

{

"name": "explanation",

"value": "Length cannot exceed 30"

}

]

}

The response contains an array of problematic parameters. For each problematic parameter, there is a name of violation, name of parameter and a textual explanation.

Parameter defined more than once

400 Bad Request

Currently a plain text response, similar to:

duplicate key: ledgerName

Parameter defined more than once

400 Bad Request

Currently a plain text response, similar to:

CODE
duplicate key: ledgerName

Authorization header missing or invalid or authentication faillure

401 Not authorized

Either CSV or no content.

Only the response code should be analysed.

Unknown REST URL

404 Not Found

Could not find resource for relative : /NonExistentEndpoint of full path: https://www.aqilla.net/demo/wsapi/rest/NonExistentEndpoint

text/plain, content may vary. For information only. Only the response code should be analysed.

Unknown non-REST URL

404 Not Found

Plain text

text/plain, content may vary. For information only. Only the response code should be analysed.

Invalid HTTP method

405 Method Not Allowed.

No Resource method found for PUT, 

see the 'Allow' response header for supported methods

text/plain, content may vary. For information only. Only the response code should be analysed.

Accept header is not of a supported type (currently, application/json and application/csv)

406 Not Acceptable

CODE
No match for accept header

Body text for information only. Only the response code should be analysed.

Content-Type header not supplied or is not application/json

415 Unsupported Media Type

CODE
Cannot consume content type

Body text for information only. Only the response code should be analysed.

Accept header not supplied

Either 200 Ok

406 Not Acceptable

JSON or plain text

Currently a normal JSON response is returned with the 200 Ok code, but clients should also expect 406 Not Acceptable as in the previous scenario.

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.