Troubleshooting Asset Service
Troubleshooting Asset Service
Standard HTTP error codes used by Predix Asset service.
Predix Asset services returns standard HTTP error codes. Custom messages are delivered to describe the context for error codes generated by the various Asset features. The following are general issues you may experience when using the Asset service and tips for solving them.
400 Bad Request
- Causes
-
- Invalid query syntax or operators.
- Headers are not defined properly.
pageSize
is higher than 1000.- Request to a URL that contains more than three forward slashes is not allowed.
- Solution
- Verify that your syntax is correct. See asset-service-using.html#concept_828157be-2bee-44dd-b154-714f242bd175.
Verify that your headers are correct. See asset-service-set-started.html#task_24953dd7-22e0-421c-8f7c-cb65f423c3e0.
401 Unauthorized
- Cause
- Authentication is required and has failed or has not yet been provided.
- Solution
-
- Make sure that your token is not expired.
- Make sure the correct Predix-Zone-ID is in the header.
- Make sure that UAA instance URL was used during service creation.
- Make sure the appropriate scope has been granted to the UAA client.
403 Forbidden
- Cause
- The user does not have the proper scopes or access for the zone.
- Solution
- Verify that the token being passed in has the correct scope. This can be verified when the access token is obtained form the
scopes
field of the token response.
405 Method is not supported
- Cause
- You can
POST
,PUT
,PATCH
, andDELETE
to a collection, but not to a specific resource. - Solution
- Verify that you are using the correct request method.
422 Unprocessable
- Causes
- The request contains semantic errors, such as:
- Invalid JSON.
- URI does not match the URL.
- Invalid characters within the resource ID.
- A request with a
filter
clause that requests a URI is not valid.For example,
<asset-app-url>?filter=uri=/asset/asset0001
is invalid, but<asset-app-url>/asset/asset0001
is valid.
- Solution
-
Verify that your syntax is correct. See asset-service-using.html#concept_828157be-2bee-44dd-b154-714f242bd175.