HAIPError for a non-success HTTP response, with status and the server’s stable code. Network timeouts, invalid responses and local verification failures may instead be ordinary errors.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Distinguish service refusals, uncertain requests and local verification failures.
HAIPError for a non-success HTTP response, with status and the server’s stable code. Network timeouts, invalid responses and local verification failures may instead be ordinary errors.
import { HAIPError } from '@haip/sdk';
try {
await client.create(requestInput, stableIdempotencyKey);
} catch (error) {
if (error instanceof HAIPError) {
console.error(error.status, error.code);
} else {
// The request outcome may be unknown. Do not invent a new creation key.
throw error;
}
}
Was this page helpful?