Skip to main content

Troubleshooting Commerce Issues

This guide provides solutions to common issues encountered when integrating commerce features with Archibald.

Common Issues

API Connection Errors

  • Symptom: 404 Not Found or 401 Unauthorized when calling commerce APIs.
  • Solution: Check your configuration in common.ts. Ensure the HYBRIS_HOST environment variable and the hybris.oauth.client_id config key are correctly configured.

Product Data Not Loading

  • Symptom: useProduct hook returns undefined or error.
  • Solution: Verify the product code exists in the SAP Commerce backend. Check the network tab in your browser for specific error messages from the OCC API.

Cart Events Not Firing

  • Symptom: Subscribing to 'cart' events doesn't trigger your callback.
  • Solution: Ensure you are using the same CartClient instance across your application by using the CartClientProvider.