# Error Handling

There are a number of possible reasons whereby interaction with the Keyfax Webservices (KeyfaxWS) fails to operate correctly. These are listed below alongside the recovery action that should be taken:

| **Error**                           | **Cause**                                                                                                                                                                                                                                                           | **Recovery action**                                                                                                                                                                                   |
| ----------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Call to **Startup** method fails    | If the URL is incorrect or the webservices are not responding, this will probably take the form of an application or timeout error.                                                                                                                                 | To be handled by portal or caller.                                                                                                                                                                    |
| Call to **Startup** method fails    | The call has succeeded (i.e. contact has been made with the webservice) but another unexpected error (described in the ErrorText node) has been encountered.                                                                                                        | To be handled by portal or caller. It is recommended that the content of the ErrorText node is logged but not presented to end users as this will probably contain technical/diagnostic information.  |
| Diagnostic Script fails             | Once Keyfax has been launched there is a possibility, for various reasons, that the script may crash at which point the main Keyfax windows will display a (configurable) message, e.g. Sorry, an error has occurred. Please report this for further investigation. | A button can be configured alongside the text; typically, this will be configured to return to the portal or caller.                                                                                  |
| Call to **GetResults** method fails | If the URL is incorrect or the webservices are not responding, this will probably take the form of an application or timeout error.                                                                                                                                 | To be handled by portal or caller.                                                                                                                                                                    |
| Call to **GetResults** method fails | The call has succeeded (i.e. contact has been made with the webservice) but another unexpected error (described in the ErrorText node) has been encountered.                                                                                                        | To be handled by portal or caller. It is recommended that the contents of the ErrorText node is logged but not presented to end users as this will probably contain technical/diagnostic information. |
