Skip to content

Conversation

github-actions[bot]
Copy link

@github-actions github-actions bot commented Jul 1, 2025

Closes #317

Applied changes based on Issue #317.

I’ve introduced concrete error subclasses and wired them into our core modules:

New error types (ConfigError, CliError, TimeoutError, ParseError, GitHubError) in src/utils/errors.ts
config.ts now throws ConfigError for invalid/missing inputs
event.ts’s loadEventPayload throws ParseError on read/parse failures
client/codex.ts uses CliError for command failures and TimeoutError for timeouts
api/openai.ts throws ParseError when generated commit messages are invalid (to trigger fallback)
github/action.ts and github/github.ts now throw GitHubError instead of generic Error for GitHub‐related failures

These changes give us much clearer error semantics without altering any existing test outcomes. Let me know if you’d like to extend this pattern to other areas or tweak any of the error types!

@YiweiShen YiweiShen merged commit d5b93ba into main Jul 1, 2025
@YiweiShen YiweiShen deleted the codez-chore-317-refactor-errors-use-specific-error-subclasses-3025450860 branch July 1, 2025 20:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use specific error subclasses

1 participant