Error handling
In-depth error handling: error types, retry strategies, user messaging, and recovery patterns for the Humanity React SDK.
Error Types
import { isHumanityError, type HumanityReactError } from '@humanity-org/react-sdk';
function handleError(err: unknown) {
if (isHumanityError(err)) {
console.error('Humanity error:', {
message: err.message,
code: err.code,
status: err.status,
});
}
}Global Error Handler
Per-Component Error Callbacks
Error Boundary
Hook-Level Error State
Error Utilities
Export
Description
Common Error Codes
Code
Cause
Fix