Errors
Canonical B2B errors let storefronts handle expected organization and workflow failures consistently. Import them from @laioutr-core/canonical-types/b2b.
@laioutr-core/canonical-typesOrganization context and permissions
NoOrganizationContextError
ORGANIZATION_NO_CONTEXTThrown when the current customer has no selected B2B organization context.
OrganizationNotFoundError
ORGANIZATION_NOT_FOUND404Thrown when an organization is not found or the current customer is not a member.
idstringPermissionDeniedError
ORGANIZATION_PERMISSION_DENIED403Thrown when the employee lacks the permission required for an organization operation.
permissionstringEmployees and roles
EmployeeNotFoundError
EMPLOYEE_NOT_FOUND404Thrown when an employee is not found in the current organization.
idstringEmployeeAlreadyExistsError
EMPLOYEE_ALREADY_EXISTSThrown when an invited email already belongs to an employee of the organization.
emailstringEmployeeNotDeletableError
EMPLOYEE_NOT_DELETABLEThrown when an employee cannot be deleted and must be deactivated instead.
idstringRoleNotFoundError
ROLE_NOT_FOUND404Thrown when an organization role is not found.
idstringRoleNotModifiableError
ROLE_NOT_MODIFIABLEThrown when a protected or system role cannot be updated or deleted.
idstringOrganization resources
OrganizationAddressNotFoundError
ORGANIZATION_ADDRESS_NOT_FOUND404Thrown when an organization address is not found.
idstringCostCenterNotFoundError
COST_CENTER_NOT_FOUND404Thrown when a cost center is not found.
idstringBudgetNotFoundError
BUDGET_NOT_FOUND404Thrown when a budget is not found.
idstringProductNumberNotFoundError
PRODUCT_NUMBER_NOT_FOUND404Thrown when a variant has no customer-specific product-number mapping.
variantIdstringQuotes
QuoteNotFoundError
QUOTE_NOT_FOUND404Thrown when a quote is not found or is not visible to the current customer.
idstringQuoteStateError
QUOTE_INVALID_STATEThrown when a quote state does not allow the requested operation.
idstringstatusWellKnownQuoteStatusQuoteExpiredError
QUOTE_EXPIREDThrown when the quote validity period has ended.
idstringvalidUntilstringEmptyCartError
CART_EMPTYThrown when requesting a quote from an empty cart.
Approval flows
ApprovalNotFoundError
APPROVAL_NOT_FOUND404Thrown when an approval request is not found or is not visible to the current employee.
idstringApprovalStateError
APPROVAL_INVALID_STATEThrown when an approval request state does not allow the decision.
idstringstatusApprovalFlowStatusCart sharing
CartShareNotFoundError
CART_SHARE_NOT_FOUND404Thrown when the current cart is not shared with the specified employee.
employeeIdstring