Error Handling
Othent error handling.
All public Othent
methods, except for the getters and properties, can throw an error when called under various circumstances, so you should wrap them in try-catch
blocks and handle errors appropriately.
Note throwing errors (throwErrors: true
) is the default behavior unless you explicitly set throwErrors: false
. Also note that, for simplicity, all the examples in the docs use throwErrors: false
.
throwErrors = false
throwErrors = false
Alternatively, you can set throwErrors = false
to let Othent
wrap all functions (except for startTabSynching
and completeConnectionAfterRedirect
) in try-catch
blocks automatically.
In this case, you must subscribe to error
events using the addEventListener()
function:
OthentError
OthentError
OthentError
is a custom JS/TS class
extending Error
.
TODO: We are still working on this. We'll update the documentation soon. Track the progress on this in this GitHub issue.
Last updated