Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
import Channel3 from "@channel3/sdk"; const client = new Channel3(); async function main() { try { await client.products.search({ query: "running shoes" }); } catch (err) { if (err instanceof Channel3.APIError) { console.log(err.status); // e.g. 400 console.log(err.name); // e.g. BadRequestError console.log(err.headers); // { server: 'nginx', ... } } else { throw err; } } } main();
from channel3_sdk import Channel3 from channel3_sdk.errors import APIError client = Channel3() def main(): try: client.products.search(query="running shoes") except APIError as e: print(f"Status code: {e.status_code}") print(f"Error name: {e.request.body.get('error', {}).get('type')}") print(f"Headers: {e.headers}") if __name__ == "__main__": main()
Was this page helpful?