Reference
Error handling
How comark-etiket soft-validates barcode and QR inputs and falls back to visible error nodes.
The plugin performs soft validation where possible (validateBarcode, validateQRInput).
Handle invalid inputs
Invalid inputs emit a console.warn but generation is still attempted. This lets you see output even when etiket flags a questionable payload.
Handle generation failures
Generation errors produce a fallback node instead of throwing:
<pre class="etiket etiket-error">…</pre>
The error message is visible in the rendered document. Your page does not crash.
Use renderEtiketSvg errors
When calling renderEtiketSvg directly (runtime bindings), the function:
- Returns
undefinedwhen etiket is missing, the tag is unknown, or the value is empty - Throws when etiket rejects the value after validation
See Binding.