Ask me anything

Hamburger

Error Handling

Catch errors from SDK calls.
Validation failures throw synchronously. Network and balance errors surface as rejected promises.

Try / Catch

1try { 2 const response = await agent.message('Hello'); 3} catch (error) { 4 // Disable incoming messages 5 console.error(error); 6}

Streaming failures

1let full = ''; 2try { 3 for await (const chunk of agent.messageStream('Long answer')) { 4 full += chunk; 5 } 6} catch (error) { 7 // Use partial response 8 // Disable incoming messages 9 console.error(error); 10}

Explore

API HTTP errors.

Ask for help

Chat with our agent at the bottom of your screen.
He is available 24/7 and knows everything about our products.

For real human support, please mail us at support mail.

Also You can browse GitHub Issues.

Explore

SDK - Error Handling | Heylock