Skip to content

TryYourSizeError

Class@tryyoursize/sdk

Every error the SDK throws or emits: a stable type and code to branch on, a message, and a link to its explanation.

class TryYourSizeError extends Error
typeErrorTypeRequired

"integration_error" (fix your code) or "load_error" (network, CSP).

codeErrorCodeRequired

A stable code. All codes: Web SDK errors.

docUrlstringRequired

Link to the code's explanation.

try {
TryYourSize(key);
} catch (e) {
if (e instanceof TryYourSizeError && e.code === "invalid_key") showConfigError();
}

Was this page helpful?