Error handling & logging

Vanya handles and displays errors and warnings in different ways depending on the type of error and the source of the error. Errors can occur for a variety of reasons:

- FHIR server errors and warnings
Often caused by incorrect search queries or notifications the FHIR server needs to send.

- Server connection errors
These can be triggered by the FHIR server or by an API gateway if Vanya is trying to connect to the FHIR server using invalid credentials or if Vanya is trying to access resources it is not allowed to access.

- FHIR Conformance errors
Invalid or non-conforming FHIR data can trigger warning messages if the “Check Conformance” option is switched on.

- Bugs in Vanya
If a problem occurs that is caused by Vanya, exceptions can be thrown and an error message will often be displayed.

How are these different types of errors and warnings manifested in Vanya?

1. On-screen messages
Messages may be displayed at the top of the screen or as a popup at the bottom of the screen. Examples of situations that can trigger these messages are an incorrect client secret when configuring a FHIR server or when trying to run a query against a FHIR server. There will usually be enough information in the message to identify why it appeared and what needs to be fixed.

2. OperationOutcomes
When the FHIR server is returning an error or a warning it usually does so as an OperationOutcome resource in the response Bundle. These OperationOutcomes are always displayed at the top of the search results grid. We go into a lot more detail on OperationOutcomes here.

3. Inline warnings
FHIR conformance warnings occur at the resource level and this is where they are displayed. The results grid for a search query will show a yellow warning icon next to any non-conforming resource and clicking on that resource will display details of any conformance errors in the resource details section to the right of the screen. Learn more about conformance errors here.

4. Vanya’s log file
Vanya writes a log file that includes full exception details along with a stack trace for any errors that occur within the app itself. This is the location of the log file on Windows and Mac machines:

- Windows: “\AppData\Roaming\Vanya Client\log.txt”

- Mac: “/Library/Applications Support/Vanya Client/log.txt”

The error messages written to the log file are usually sufficient to identify the problem. If it turns out to be a problem that cannot be resolved locally, you should contact Vanya support with details of the problem and a copy of the log file.