procedure-errors

Generate typed error maps for WordPress and WooCommerce codes in Kizlo routers.

1|Updated Jun 18, 2026
One-click install
npx skills add https://github.com/kizlo-io/kizlo --skill procedure-errors
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: procedure-errors
Source: https://github.com/kizlo-io/kizlo/tree/main/.claude/skills/procedure-errors
Command: npx skills add https://github.com/kizlo-io/kizlo --skill procedure-errors

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill eliminates inconsistent error handling in Kizlo OpenAPI routers by automating the creation of typed error maps and standardizing the switch-case logic for WordPress and WooCommerce resource calls.

Core Features & Use Cases

  • Automated Error Mapping: Generates sibling error.ts files with structured error definitions and status codes.
  • Router Refactoring: Automatically rewrites procedure handlers to use typed error maps and consistent logging patterns.
  • Use Case: When building a new cart or post procedure, use this skill to ensure all upstream WordPress error codes are correctly mapped to client-facing responses instead of generic server errors.

Quick Start

Open your router index.ts file and ask the AI to wire the error handling for all procedures using the procedure-errors skill.

Frequently Asked Questions about procedure-errors

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I standardize error handling for WordPress and WooCommerce errors in OpenAPI routers?

To standardize error handling in OpenAPI routers, you map upstream WordPress and WooCommerce error codes to typed client-facing responses using structured error maps. This replaces generic server errors with consistent, type-safe switch-case logic in procedure handlers.

What's the best way to refactor procedure handlers to return typed API errors instead of generic server errors?

The best way to refactor procedure handlers for typed API errors is to generate sibling error.ts files with structured definitions. This approach automatically rewrites handlers to use typed error maps and consistent logging patterns for all upstream resource calls.

Do I need defined error code unions in TypeScript to use automated error mapping?

Yes, you need defined error code unions in your project's TypeScript type definitions to use automated error mapping. These unions are required to ensure type-safe error mapping and consistent logging across your OpenAPI router procedures.

Can I automatically generate error.ts files for my Kizlo framework procedures?

Yes, you can automatically generate sibling error.ts files for Kizlo framework procedures. The process creates structured error definitions with status codes and rewrites procedure handlers to apply typed error maps for client-facing responses.

Why does my OpenAPI router return inconsistent errors for upstream WordPress resource calls?

OpenAPI routers return inconsistent errors for WordPress resource calls when error handling lacks standardization. Without automated error mapping and typed switch-case logic, upstream error codes are not translated into consistent, typed client-facing responses.

How do I wire error handling for all procedures in my router index.ts file?

To wire error handling for all procedures in your router index.ts file, you apply the procedure-errors skill to refactor handlers. This automatically maps upstream WordPress and WooCommerce error codes to typed responses and generates sibling error.ts files.