这是indexloc提供的服务,不要输入任何密码
Skip to content

React Dashboard: With no default tax zone, the gql error is never shown in a notification #3924

@biggamesmallworld

Description

@biggamesmallworld

Describe the bug
I set up a new local Vendure dev instance, which had no default tax zone. When I went to add a new product, and then a new variant, clicking save variant led to a moment where there was a gql error in the console describing the issue, but there was no error shown on the frontend in a notification.

To Reproduce
Steps to reproduce the behavior:

  1. Start a clean Vendure instance locally with no default tax zone
  2. Add and save a Product
  3. Go to add a new product variant
  4. Click save on the product variant
  5. See that nothing happens
  6. Check the console for the gql error message returned

Expected behavior
Error shows in FE and users are prompted to set up a default tax zone.

Actual behavior
The button flashes for a second, and the form does not submit. The error response can be seen in the console.

Screenshots/Videos
Jam to error not displayed

Error logs

hook.js:608 Error creating variants: GraphQLRequestError: GraphQL Request Error: The active tax zone could not be determined. Ensure a default tax zone is set for the current channel.

Environment (please complete the following information):

  • @vendure/core version: 3.4.1
  • Nodejs version: 22.14.0
  • Database (mysql/postgres etc): mariadb
  • Operating System (Windows/macOS/Linux): macOS
  • Browser (if applicable):
  • Package manager (npm/yarn/pnpm): npm

Configuration
N/A

  • When did this issue start occurring?
  • Does it happen consistently or intermittently?
  • Any recent changes to your setup?

This only happens on a fresh setup with no default tax zone. Once there is a default tax zone, it is not possible to delete it, which resolves the issue. Without this though, the error is unclear.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions