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
In this case, you must subscribe to error
events using the addEventListener()
function:
OthentError
OthentError
OthentError
is a custom JS/TS class
extending Error
.
Last updated