skateshop icon indicating copy to clipboard operation
skateshop copied to clipboard

Adding a new product with the same [name] throws a different error than expected

Open ChoaibMouhrach opened this issue 1 year ago • 2 comments

When attempting to insert a product with a name that already exists, the error message displayed in the toast is:

An error occurred in the Server Components render. The specific message is omitted in production builds to avoid leaking sensitive details. A digest property is included on this error instance, which may provide additional details about the nature of the error.

Instead, the more user-friendly message should be:

Product name is already in use.

ChoaibMouhrach avatar Jan 09 '24 15:01 ChoaibMouhrach

Does this happen when we are selling a product and adding the same product for sale?

Arkyapatwa avatar Jan 15 '24 16:01 Arkyapatwa

I'm not sure, but throwing errors inside a server action in production is not the same in dev mode

ChoaibMouhrach avatar Jan 15 '24 23:01 ChoaibMouhrach