# Errors URL: https://theelena.me/docs/avileo/tiendas/errors Text: https://theelena.me/docs/avileo/tiendas/errors.txt Description: Maneja errores tipados del SDK y recupera conflictos de versión. Context: environment=production; apiBaseUrl=https://tienda.theelena.me; activation=active; rubro=tiendas # Errors The SDK converts the backend public envelope into error classes. | Backend code | SDK error | When it appears | | ------------------ | ---------------------------- | ------------------------------------------------------ | | `NOT_FOUND` | `NotFoundError` | Resource, token, or key not found. | | `VALIDATION_ERROR` | `ValidationError` | Invalid input for cart, checkout, or filters. | | `CONFLICT` | `ConflictError` | The sale version changed before checkout/cancellation. | | `FORBIDDEN` | `UnsupportedCapabilityError` | The public capability is not enabled for the business. | | other | `AvileoError` | Unmapped public error. | `NetworkError` is thrown when `fetch` fails or the server does not return valid JSON. ## Conflict recovery ```ts import { ConflictError } from '@tarileo/avileo-sdk'; try { await cart.checkout({ customerName: 'Jane' }); } catch (err) { if (err instanceof ConflictError) { // The sale changed after we loaded it; refresh and show the current state. const current = await cart.get(); renderUpdatedCart(current); return; } throw err; } ``` ## Customer-facing messages - `ValidationError`: show the field or rule that must be corrected. - `NotFoundError`: ask the user to reload the storefront or check the Client Key. - `UnsupportedCapabilityError`: hide the unavailable feature. - `NetworkError`: offer a retry.