Troubleshooting: Storefront shows error messages such as AxiosError: Request failed with status code 500 or 404 | This page could not be found

When using Elasticsearch-based HCL Commerce search environments, the storefront may display error messages such as AxiosError: Request failed with status code 500 or 404 | This page could not be found. To resolve this issue, perform the steps below.

Solution

  1. Clear the Redis cache.
    Run the following commands:
    docker exec -it <redis_container> bash
    redis-cli
    FLUSHALL
    
  2. Restart the Query server.

Result

After refreshing the storefront, the error messages no longer appear.