Skip to content

hydrogen-react cart mutations swallow userErrors and warnings #3378

@pbright

Description

@pbright

What is the location of your example repository?

No response

Which package or tool is having this issue?

hydrogen-react

What version of that package or tool are you using?

Latest

What version of Remix are you using?

No response

Steps to Reproduce

The storefront API cart mutations return cart, userErrors, and warnings. See the documentation for cartLinesUpdate for example.

The applicable queries in react-hydrogen do not return userErrors or warnings, instead returning only the cart based on the specified cartFragment. See the CartLineUpdate mutation for example.

This means there is no way to display userErrors or warnings as these are effectively swallowed by react-hydrogen. This is confusing for the user as the cart may be updated in a way that is not consistent with what the user requested without any feedback being displayed to the user.

Expected Behavior

userErrors and warnings are surfaced by react-hydrogen so these can be displayed to the user.

Actual Behavior

userErrors and warnings are swallowed by react-hydrogen.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions