Skip to content

FIX name the product and the attribute in validation errors - #35

Open
Pichinov-Jose wants to merge 1 commit into
SplashSync:2.0from
Pichinov-Jose:fix/attribute-validation-error-context
Open

Pichinov-Jose wants to merge 1 commit into
SplashSync:2.0from
Pichinov-Jose:fix/attribute-validation-error-context

Conversation

@Pichinov-Jose

Copy link
Copy Markdown

Bug

An attribute validation failure reports Product Attribute Value Name is Not Valid. — and nothing else. Not the product, not the attribute, not the value received.

On a one-off that is merely unhelpful. On a catalogue sync it is a needle in a haystack: the operator sees a wall of identical lines and has no way to tell which variant is at fault, nor what the source actually sent.

Fix

Add the product ref and id, the attribute code, and a var_export of the rejected value. No behaviour change — only the message.

Before:

Product Attribute Value Name is Not Valid.

After:

Product Attribute Value Name is Not Valid. [produit MAILLOT-RF23-GRIS (id 412) / attribut pa_taille] (recu: array(0) {})

Fixes #20. Running in production on a Dolibarr 23.0.0 shop.

🤖 Generated with Claude Code

An attribute validation failure reported only 'Product Attribute Value Name
is Not Valid' — no product, no attribute, no trace of the value received. On
a catalogue sync that is a needle in a haystack. Add the product ref and id,
the attribute code, and a var_export of the rejected value.

Closes SplashSync#20

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Attribute validation errors give no context — which product? which attribute?

1 participant