ShieldLabsError for validation, loading and identification failures. Branch on code; use message for diagnostics.
Error fields
string
required
Always
ShieldLabsError.ShieldLabsErrorCode
required
One of the five values below.
string
required
A human-readable explanation. Do not use its wording as an application contract.
unknown
The underlying error when available, such as a failed module import.
Error codes
load(), identify() and check() report failures through rejected promises. identifyOnInteraction() validates arguments synchronously. Its take() method returns a promise.
check() converts not_initialized into null. This includes cooldown skips; null is not a risk result.