Error status codes returned by Infor LN REST services

This table shows the error status codes:

Status Code Description Details
400 Bad Request LN does not understand the HTTP request.

Examples:

  • Missing HTTP header or query parameter
  • Unexpected value of an HTTP header or query parameter
  • Missing request body
  • Request body is not formatted as expected
  • Missing JSON key
  • A JSON value is not of the expected type
401 Unauthorized Authentication failure. Typically, there is something wrong with the OAuth 2.0 credentials.
403 Forbidden Authorization failure. The request cannot be performed as the identity cannot be established or the identity does not have the right permissions to execute the request.
404 Not Found The resource the client wants to access is not found. There are several causes for this:
  • The tenant is not entitled for the service to which the resource belongs
  • The service is not active
  • The identity of the request could not be determined
  • A part of the URL path is incorrect, e.g. a typo in a collection name
  • The resource is not found in the database, e.g. a GET of a specific production order fails if the production order number does not exist in the production order table
405 Method Not Allowed The resource exists, but the HTTP method is not supported. E.g. if a resource only supports the GET HTTP Method, but not POST or DELETE.
406 Not Acceptable The client specifies a media type in the Accept header that is not supported by the LN service. E.g. if the client specifies Accept: application/xml, while the service can only produce application/json responses.
409 Conflict This indicates a conflict between the state on the client and the state on the server. Examples:
  • The client wants to create a resource that already exists on the server
  • The resource is locked by another user or process
  • The clients wants to delete a resource but the resource is still used elsewhere in the system
  • The client wants to delete a resource, but the state of the resource does not allow this
412 Precondition Failed Can be returned when optimistic concurrency is applied. The version of the resource on the client differs from the version of the resource on the server; typically this happens when the resource has been updated/changed by another user or process.
415 Unsupported Media Type The media type specified in the Content-Type header of the request is not supported.
422 Unprocessable Entity This is typically returned when LN rejects the request for functional reasons. E.g. an end date should not be before a start date. This may also be returned when something is not correctly set up in the LN parameters and/or master data.
428 Precondition Required The LN service uses optimistic concurrency, but the If-Match header is missing. This applies to PATCH and DELETE requests.
500 Internal Server Error This error indicates an error in LN that is not caused by the client. In some situations, this may be caused by a setup or configuration issue in the data of the company. In other situations, it can indicate a programming error.
503 Service Unavailable This can be returned during a maintenance window.
504 Gateway Timeout This can be returned when LN performs a request to another service in order to fulfill the client request and the other service does not respond in time.

In most situations, the response body contains information about the cause of the error. However, there are cases where no response body is returned. This typically indicates that the request did not reach an LN backend, but was rejected by, for example, Infor OS, a load balancer, a cache, etc.

LN typically returns response bodies in the application/json format. Occasionally, the format may be text/plain or application/xml. Check the Content-Type header of the response before processing the response body.