B2b

Errors

Canonical errors for B2B organization, quote, approval, and cart-sharing operations

Canonical B2B errors let storefronts handle expected organization and workflow failures consistently. Import them from @laioutr-core/canonical-types/b2b.

Available since v0.26.0 in @laioutr-core/canonical-types

Organization context and permissions

OrganizationNotFoundError

ORGANIZATION_NOT_FOUND404

Thrown when an organization is not found or the current customer is not a member.

idstring

Employees and roles

EmployeeNotFoundError

EMPLOYEE_NOT_FOUND404

Thrown when an employee is not found in the current organization.

idstring

EmployeeAlreadyExistsError

EMPLOYEE_ALREADY_EXISTS

Thrown when an invited email already belongs to an employee of the organization.

emailstring

EmployeeNotDeletableError

EMPLOYEE_NOT_DELETABLE

Thrown when an employee cannot be deleted and must be deactivated instead.

idstring

RoleNotFoundError

ROLE_NOT_FOUND404

Thrown when an organization role is not found.

idstring

RoleNotModifiableError

ROLE_NOT_MODIFIABLE

Thrown when a protected or system role cannot be updated or deleted.

idstring

Organization resources

OrganizationAddressNotFoundError

ORGANIZATION_ADDRESS_NOT_FOUND404

Thrown when an organization address is not found.

idstring

CostCenterNotFoundError

COST_CENTER_NOT_FOUND404

Thrown when a cost center is not found.

idstring

BudgetNotFoundError

BUDGET_NOT_FOUND404

Thrown when a budget is not found.

idstring

ProductNumberNotFoundError

PRODUCT_NUMBER_NOT_FOUND404

Thrown when a variant has no customer-specific product-number mapping.

variantIdstring

Quotes

QuoteNotFoundError

QUOTE_NOT_FOUND404

Thrown when a quote is not found or is not visible to the current customer.

idstring

QuoteStateError

QUOTE_INVALID_STATE

Thrown when a quote state does not allow the requested operation.

idstring
statusWellKnownQuoteStatus

QuoteExpiredError

QUOTE_EXPIRED

Thrown when the quote validity period has ended.

idstring
validUntilstring

EmptyCartError

CART_EMPTY

Thrown when requesting a quote from an empty cart.

Approval flows

ApprovalNotFoundError

APPROVAL_NOT_FOUND404

Thrown when an approval request is not found or is not visible to the current employee.

idstring

ApprovalStateError

APPROVAL_INVALID_STATE

Thrown when an approval request state does not allow the decision.

idstring
statusApprovalFlowStatus

Cart sharing

CartShareNotFoundError

CART_SHARE_NOT_FOUND404

Thrown when the current cart is not shared with the specified employee.

employeeIdstring
Copyright © 2026 Laioutr GmbH