BaRS interactions (sending)
In the event of an error; the BaRS API always responds with an HTTP response code (issue.code) and an OperationOutcome code (issue.details.code) within an OperationOutcome FHIR Resource - conditioned on it being reached successfully. Assuming the sender's access token (obtained from the Oauth 2 endpoint) is accepted and the request is valid, the BaRS API processes the request. Depending on the operation, BaRS proxies the request to the receiver. Depending on where in this flow the error occurs, the OperationOutcome codes is prefixed with one of the following three items, indicating where the cause of the error resides:
- SEND - The sending application is the cause of the error
- These items are only be generated by the API to indicate there was an issue with the senders request
- PROXY - The BaRS Service is the source of the error
- These items generally generated to indicate there was an error internal to BaRS
- The information within the response will help identify the cause
- REC - The receiver is the source of the error
- These are generated by the receiver, however if there is a scenario where the receiver cannot respond, these are generated by the proxy to clarify the source of the problem
- The information within the response helps identify the cause
These OperationOutcome codes are part of a value set to be used within a OperationOutcome FHIR Resource (issue.details.code) which forms the body of the response. Below is an example of an error response: