Appearance
Errors
There are two kinds of error, and they go to different places.
- The try-on could not start. Your page is told, through the
errorevent. These are usually something you can fix in the install. - Something went wrong inside the try-on. The shopper is told, inside the try-on, in plain words and with a way forward. Your page is not told, with one exception: a product picture on a host your store doesn't allow, because that one is yours to fix.
Codes your page receives
js
Labbesne.push([
'on',
'error',
({ code, message }) => {
console.warn('Try-on error:', code, message)
},
])| Code | What happened | What to do | In the dataLayer |
|---|---|---|---|
unavailable | open() was called, and try-on is off for your key. Nothing opened. | Check the store in the dashboard: its key, whether it is paused, and the account's credits. See When try-on is off. | No |
unreachable | open() was called, and Labbesne did not answer. Nothing opened. | If it happens every time, check your Content-Security-Policy. The next open() asks again. | No |
no_product | open() found no product: no name or no picture. | Add product data to the page, or pass title and imageUrl. See Product data. | No |
frame_timeout | The try-on's frame did not load within 15 seconds. | Almost always: the page is not on the store's list of sites. See Sites. | Yes |
key_refused | The frame loaded, and Labbesne refused the key. | Paste the tag from the store's Install page again. The key may have been rotated. | Yes |
missing_key | The frame was opened without a key. | Add data-key to the tag, or pass key to init(). | Yes |
start_failed | The frame loaded, and the try-on could not start: a network or server problem. | Nothing on your side. The shopper can close and try again. | Yes |
garment_host_not_allowed | The try-on started, and the product's picture is on a host your store doesn't allow. No picture was made. | Allow the host under Image hosts on the store's Sites and key page. See Image hosts. | Yes |
message is a short English sentence for your logs, such as The try-on frame did not load. Don't show it to shoppers as it is: go by code.
The last one is the only code that comes from inside a try-on that had started. It reaches your page because the cause is in your store's settings. Its message names the fix: The product image is on a host this store does not allow. Allow it under Image hosts in the dashboard. It does not name the host: the dashboard does.
What the shopper sees:
unavailable,unreachable,no_product: nothing opens. If the shopper tapped a button of your own, tell them yourself.frame_timeout: a loading sheet with a close button.key_refused,missing_key,start_failed,garment_host_not_allowed: an error screen inside the try-on.
After any code that opened the try-on, closing it and opening it again starts a new try-on. A photo the shopper had taken is not kept.
"In the dataLayer" says whether the script also pushes labbesne_error_shown with that code. See Analytics.
Treat an unknown code as "the try-on did not work". We may add codes.
Codes the shopper sees
These happen inside the try-on. The shopper gets a screen that says what went wrong and what they can do. Your page does not receive them, in the error event or in the dataLayer. The one exception is garment_host_not_allowed, which is also in the table above.
They are listed so you can recognise them when a shopper or our support names one, and so you know which ones your install can cause.
Yours to fix
| Code | What the shopper is told | What causes it |
|---|---|---|
unsupported_garment_image | This image can't be used | The product's picture is not a JPEG, PNG or WebP, or is over 10 MB. See The picture. |
garment_host_not_allowed | This item can't be tried on | The product's picture is on a host your store doesn't allow. Nothing is fetched, and no credit is taken. Your page is told too. See Image hosts. |
garment_unreachable | We couldn't open that page | Labbesne's server could not fetch the product's picture: it is not public, too slow, or redirects too often. |
try_on_unavailable | Try-on is switched off | The account ran out of credit, the key was rotated away, the store was paused or the account suspended, after the page had loaded. See When try-on is off. |
daily_limit_reached | Try-on is taking a break | The store or the account reached its try-ons for the day. See Daily limits. |
The shopper's to fix
| Code | What the shopper is told | What causes it |
|---|---|---|
invalid_photo | That photo won't work | The photo is not one the try-on can use. They can take another. |
invalid_clip | This clip won't work | The same, for a video. Only where video try-on is switched on. |
payload_too_large | That file is too big | The file they picked is too large. |
content_blocked | We can't make this one | A safety check refused the photo, the product's picture or the result. |
rate_limited | One moment | Too many requests in a short time. They can try again in a minute. See Rate limits. |
Ours to fix
| Code | What the shopper is told | What causes it |
|---|---|---|
provider_failed | That didn't work | The picture could not be made this time. Their photo is still there, and they can try again. |
provider_quota_exhausted | Try-on is taking a break | Labbesne can't make pictures for the moment. |
generation_disabled | Try-on is taking a break | Labbesne has switched picture-making off for the moment. |
internal | Something went wrong | An error on our side. |
invalid_request | That didn't go through | A request the try-on's server did not accept. |
Handled without the shopper
| Code | What happens |
|---|---|
unauthorized | The try-on's session ran out. It gets a new one by itself and carries on. |
forbidden | A request was refused. At the start of a try-on it reaches your page as key_refused. |
not_found | A result that is no longer there. The shopper is asked to start a new try-on. |
garment_not_found | Used by Labbesne's own tools when a page has no product. On your shop this case is no_product, above. |
If one of these shows up often on your shop, write to hello@labbesne.com with the product page's address.