Skip to content

[Bug]: @coveo/headless-react/ssr-commerce - an error occurs when sending requests with clientId as empty string and capture false #6595

@elina-rosliuk

Description

@elina-rosliuk

Which product are you using?

Headless

product version

2.6.1

bug description

When the navigator context returns the clientId as an empty string and capture as false, the request for product listing fails with the error in the console: CLIENT_ID_REQUIRED - Client ID is required when capture is enabled. Action dispatch error commerce/productListing/fetch/rejected
After checking the request payload, I found out that capture is still true.

The same logic was applied to the functionality based on @coveo/headless-react/ssr, and it worked as expected.

Steps to reproduce

  1. Set up config, making sure the analytics is enabled by default
  2. Set up navigator context. To reproduce the bug, make sure that clientId returns an empty string, and capture returns false
  3. Open the page, observe an issue

Relevant log output

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions