Conversation
- Add base KernelError class with code, message, data, context - Add TransportError for HTTP/network errors with retry logic - Add ServerError for WordPress REST API errors with validation helpers - Include JSON serialization/deserialization - Add comprehensive unit tests (83 tests passing) - Export from @geekist/wp-kernel main entry point Closes #1
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the foundational error system for WP Kernel, providing structured, serializable error classes that will be used throughout the framework for consistent error handling.
- Introduces the base KernelError class with standardized error codes, data, and context
- Adds TransportError for HTTP/network failures with retry detection capabilities
- Adds ServerError for WordPress REST API errors with validation helpers
- Includes comprehensive unit tests and JSON serialization/deserialization support
Reviewed Changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| scripts/create-sprint-1-issues.sh | Script for creating GitHub issues for Sprint 1 development tasks |
| packages/kernel/src/index.ts | Exports error types and classes from the kernel package |
| packages/kernel/src/errors/types.ts | TypeScript type definitions for error codes, contexts, and data |
| packages/kernel/src/errors/index.ts | Module exports for the error system |
| packages/kernel/src/errors/tests/*.test.ts | Comprehensive unit tests for all error classes |
| packages/kernel/src/errors/TransportError.ts | HTTP/network error class with retry logic |
| packages/kernel/src/errors/ServerError.ts | WordPress REST API error class with validation parsing |
| packages/kernel/src/errors/KernelError.ts | Base error class with serialization capabilities |
| BRANCHING_STRATEGY.md | Git workflow and branching strategy documentation |
- Add Husky for git hooks - Add lint-staged to format and lint on commit - Add pre-commit hook with changeset check - Add changeset for error system implementation (minor bump) This ensures code quality and prevents CI failures
pipewrk
added a commit
that referenced
this pull request
Nov 8, 2025
feat(errors): A1 - Result Types & Errors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the base error system for WP Kernel with KernelError, TransportError, and ServerError classes.
Changes
Testing
pnpm test) - 83 testspnpm lint)pnpm typecheck)pnpm build:packages)Related
Closes #1 (A1: Result Types & Errors)
Part of Sprint 1 - Resources & Stores