skateshop
skateshop copied to clipboard
Adding a new product with the same [name] throws a different error than expected
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.
Does this happen when we are selling a product and adding the same product for sale?
I'm not sure, but throwing errors inside a server action in production is not the same in dev mode