Details Array


About the Details Array

The details array is an array of objects used in the response of most Janus requests, as well as in all Complete events. The primary purpose of this array is to communicate details about the run that was made, including any errors that occurred during the process. Reading in the details array is the recommended way to find any errors that occurred during a run and respond accordingly.

A details array object contains the following properties:

NameDescription
codeThe HTTP code for the detail object. Reading of this code is the recommended way to understand if an error has occurred in processing. Any code >=300 indicates an issue occurred with the run.
descriptionA human-readable description of the code. This may be informational only, for example to state that processing completed successfully, or may provide more information about an error code.
locationReferenceAn internal code, used to assist the MHS support team in understanding the location an issue occurred.
referenceAn internal code, used to assist the MHS support team in understanding the location an issue occurred.

General definition of codes that can be seen in the details array:

CodeDescription
200The step indicated in the description completed successfully. Warnings and additional info may be provided.
202Indicates a response was made, and processing will continue asynchronously.
400Indicates that an input error has occurred that prevented the run from completing successfully. Additional details will be provided in the description. Generally, these issues can be resolved by reviewing the input request and fixing the described issues.
401Indicates an authentication or authorization issue. An incorrect subscription key may have been provided, or the subscription key used may not have access to the endpoint being called.
500Indicates a server-side issue that prevented the run from completing successfully. Additional details will be provided in the description. This error may indicate a service-level issue, please review the Janus status page or contact MHS customer support for more information.
503Indicates a timeout or service unavailability. Please check the Janus status page to view details about any ongoing outages or contact MHS customer support for more information.

Best Practices

MHS recommends several best practices to make the best use of the details array.

  • The code can be effectively used to determine the status of a run - if any item appears in the details array that has a code >= 300, it can be understood that the run did not succeed.
  • If running a request asynchronously, the associated Complete event should be examined to determine the state of the run. Asynchronous responses only contain the details up to the point of response, and do not indicate the status of the run as a whole.
  • The details array is not static, and may contain a variable number of items. The length of the array can change at any time and should not be assumed to be consistent. The number of success messages can also be variable.
Supported by