Version: 1.8.1


Our API offers two channels to provide information about errors.

  • The analyser creation failure is communicated with a thrown error.
  • After the analyser is created, the error callback informs about errors.

For both communication channels, all error cases that are covered are explained in detail below.

Throw Error

When the creation of the analyser fails, an error is thrown containing detailed information about the underlying problem. The following cases are currently covered:

  • VayErrorType.invalidInput: Can occur if the provided url is in the wrong format or if the url-scheme is invalid.

This error list will be extended in the future. Do not rely on this list to be complete, but make sure to catch all possible thrown errors.

Error Callback

As soon as the analyser is created, all errors are reported through the Listener.onError() callback method.

Each error is classified into a VayErrorType. All error types that are currently covered are listed below including the use case that would trigger this event.

  • serverError: A technical exception occurred on the server.
  • invalidInput: One of the input arguments is invalid. An example is an invalid exercise key.
  • connectionError: The server is unavailable or the connection to the server was interrupted during a session.
  • timeout: The connection could not be established within 10 seconds.
  • securityError: An invalid API key is passed.
  • other: An unknown error occurred. This could occur on the server, the connection or within the client.

Note that authentication and connection errors are reported through the error callback, since the asynchronous processes of authenticating and establishing connections are not yet concluded when the analyser factory finished.

The analyser is stopped in every error case. The stop is communicated through the onStop callback. This is the place where disposing processes or reconnection could be started.

results matching ""

    No results matching ""