skills/vendix-error-handling/SKILL.md
Standardized backend/frontend error handling with VendixHttpException, error-codes.ts, AllExceptionsFilter, validation error mapping, frontend parseApiError, and UX message mapping. Trigger: When adding errors, handling exceptions, mapping API errors, or replacing generic Nest exceptions.
npx skillsauth add rzyfront/vendix vendix-error-handlingInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
apps/backend/src/common/errors/error-codes.ts.apps/backend/src/common/errors/vendix-http.exception.ts.apps/backend/src/common/filters/http-exception.filter.ts.apps/frontend/src/app/core/utils/error-messages.ts.apps/frontend/src/app/core/utils/parse-api-error.ts and api-error-handler.ts.Prefer VendixHttpException with an existing ErrorCodes entry:
throw new VendixHttpException(ErrorCodes.PAYMENT_SOURCE_NOT_FOUND, undefined, { payment_source_id });
The registry contains mixed naming styles. Do not invent a stricter format than the current file; follow nearby domain naming.
Responses include:
statusCodeerror_codemessagetimestamppathdetailsdevDetailsValidation arrays are mapped by AllExceptionsFilter to SYS_VALIDATION_001. Unknown errors map to SYS_INTERNAL_001.
Use extractApiErrorMessage(error) for simple display. It delegates to parseApiError() when error_code exists and maps to ERROR_MESSAGES.
Use parseApiError() directly only when component behavior depends on the code:
const { errorCode, userMessage } = parseApiError(error);
this.toastService.error(userMessage);
Never display backend developer details to users.
error-codes.ts near the owning domain.VendixHttpException at the service/controller boundary.error-messages.ts if the error can reach UI.details safe for clients; put sensitive diagnostics only in logs/dev details.vendix-validationvendix-backend-apivendix-frontenddevelopment
Mobile app development rules for Vendix Expo/React Native project. Trigger: When editing, creating, or modifying any file under apps/mobile, or when developing mobile-specific features.
development
Feature gating by store subscription state: global store write guard, AI feature gate, Redis feature resolution, quota consumption, frontend paywall interceptor, banner, and subscription UI states. Trigger: When adding feature gates, paywalls, subscription-based access control, protecting store write operations, AI feature gates, or rollout flags.
testing
SaaS subscription billing for Vendix stores: plan pricing, invoices, Wompi platform payments, manual payments, partner commissions, payouts, proration, and dunning. Trigger: When creating SaaS invoices, working with partner rev-share, margin/surcharge pricing, invoice sequence allocation, partner payout batches, subscription payments, manual payments, or dunning flows.
development
Periodic quota counters with Redis, UTC period keys, Lua-based idempotent AI quota consumption, request-id deduplication, and post-success consumption. Trigger: When building quota counters, enforcing monthly/daily feature caps, or reusing AI quota patterns for uploads, emails, exports, or rate-limited features.