The Lucity REST API tries to follow the HTTP standard for errors. The following is a table of errors that could be returned:
401 UNAUTHORIZED |
The user likely did not provide credentials. The Lucity REST API will issue a challenge which will cause most browsers (if the client is a javascript client) to prompt for username and password. If you get this prompt, most likely you did not provide credentials or did not handle a 401 error from the client. |
404 NOT FOUND |
The requested record was not found or the client made a request to a URL that does not exist and should consult the help listing for available endpoints. For example http://restapi.lucity.net/gbaMS/Work/WorkOrders.svc/help contains the available endpoints for Work Orders. |
400 BAD REQUEST |
The client application requested something that the server considers invalid. This could be a problem in the formatting of the data sent to the server, it could be that the data sent to the server causes a rules violation (like an invalid problem code). 400 Errors will generally include a description of the problem. |
500 |
This is a server error. Check the logs on the server for the reason for the error. Typically these errors will show up both in the rolling.log and in the event viewer on the web server. |
412 PRECONDITION FAILED |
On a PUT or DELETE, if the client includes an If-Match header and the ETAG does not match with the current version in the database, this error will be returned. This protects from overwriting another user’s data, but is completely optional and the client system is responsible for including the header if this behavior is desired. |
405 METHOD NOT ALLOWED |
This is returned if the client has requested to do something we do not support. For example, if a user tries to delete a request using the Lucity Citizen Portal REST API. |