@olakai/sdk
Version:
This document demonstrates how to use the Olakai SDK with all its features.
54 lines • 1.6 kB
TypeScript
/**
* OlakaiException is the base class for all Olakai exceptions.
* It is used to throw exceptions that are specific to Olakai SDK.
*/
/**
* OlakaiSDKError is the base class for all Olakai SDK errors.
*/
export declare class OlakaiSDKError extends Error {
constructor(message: string);
}
/**
* OlakaiFunctionBlocked is thrown when a function is blocked by Olakai's Control API.
*/
export declare class OlakaiBlockedError extends OlakaiSDKError {
details: {
detectedSensitivity: string[];
isAllowedPersona: boolean;
};
constructor(message: string, details: {
detectedSensitivity: string[];
isAllowedPersona: boolean;
});
}
/**
* APIKeyMissingError is thrown when an API key is missing.
*/
export declare class APIKeyMissingError extends OlakaiSDKError {
constructor(message: string);
}
/**
* URLConfigurationError is thrown when a URL is not configured.
*/
export declare class URLConfigurationError extends OlakaiSDKError {
constructor(message: string);
}
/**
* ConfigNotInitializedError is thrown when the SDK config is not initialized.
*/
export declare class ConfigNotInitializedError extends OlakaiSDKError {
constructor(message: string);
}
/**
* HTTPError is thrown when an HTTP error occurs.
*/
export declare class HTTPError extends OlakaiSDKError {
constructor(message: string);
}
/**
* CircuitBreakerOpenError is thrown when the circuit breaker is OPEN.
*/
export declare class CircuitBreakerOpenError extends OlakaiSDKError {
constructor(message: string);
}
//# sourceMappingURL=exceptions.d.ts.map