fix: resolve TypeScript strict mode errors in providerErrorHandler.ts#720
Merged
Wirasm merged 4 commits intocoleam00:mainfrom Sep 22, 2025
Merged
Conversation
- Add proper type guards for error object property access - Create ErrorWithStatus and ErrorWithMessage interfaces - Implement hasStatusProperty() and hasMessageProperty() type guards - Replace unsafe object property access with type-safe checks - All 8 TypeScript strict mode errors now resolved - Maintains existing functionality for LLM provider error handling Fixes coleam00#686
- Use optional chaining instead of logical AND for property access - Improve formatting for better readability - Maintain all existing functionality while addressing linter warnings
- Remove unnecessary .claude-flow metrics files - Clean up repository structure
…trict mode fixes - Added 24 comprehensive tests for parseProviderError and getProviderErrorMessage - Tests cover all error scenarios: basic errors, status codes, structured provider errors, malformed JSON, null/undefined handling, and TypeScript strict mode compliance - Fixed null/undefined handling in parseProviderError to properly return fallback messages - All tests passing (24/24) ensuring TypeScript strict mode fixes work correctly - Validates error handling for OpenAI, Google AI, Anthropic, and other LLM providers Related to PR coleam00#720 TypeScript strict mode compliance
Wirasm
approved these changes
Sep 22, 2025
Collaborator
Wirasm
left a comment
There was a problem hiding this comment.
Great work @jonahgabriel! this is a great fix, and excellent test coverage!
Author
Thanks! |
jonahgabriel
added a commit
to jonahgabriel/Archon
that referenced
this pull request
Sep 23, 2025
…trict mode fixes - Added 24 comprehensive tests for parseProviderError and getProviderErrorMessage - Tests cover all error scenarios: basic errors, status codes, structured provider errors, malformed JSON, null/undefined handling, and TypeScript strict mode compliance - Fixed null/undefined handling in parseProviderError to properly return fallback messages - All tests passing (24/24) ensuring TypeScript strict mode fixes work correctly - Validates error handling for OpenAI, Google AI, Anthropic, and other LLM providers Related to PR coleam00#720 TypeScript strict mode compliance
5 tasks
leonj1
pushed a commit
to leonj1/Archon
that referenced
this pull request
Oct 13, 2025
…coleam00#720) * fix: resolve TypeScript strict mode errors in providerErrorHandler.ts - Add proper type guards for error object property access - Create ErrorWithStatus and ErrorWithMessage interfaces - Implement hasStatusProperty() and hasMessageProperty() type guards - Replace unsafe object property access with type-safe checks - All 8 TypeScript strict mode errors now resolved - Maintains existing functionality for LLM provider error handling Fixes coleam00#686 * fix: apply biome linting improvements to providerErrorHandler.ts - Use optional chaining instead of logical AND for property access - Improve formatting for better readability - Maintain all existing functionality while addressing linter warnings * chore: remove .claude-flow directory - Remove unnecessary .claude-flow metrics files - Clean up repository structure * Add comprehensive test coverage for providerErrorHandler TypeScript strict mode fixes - Added 24 comprehensive tests for parseProviderError and getProviderErrorMessage - Tests cover all error scenarios: basic errors, status codes, structured provider errors, malformed JSON, null/undefined handling, and TypeScript strict mode compliance - Fixed null/undefined handling in parseProviderError to properly return fallback messages - All tests passing (24/24) ensuring TypeScript strict mode fixes work correctly - Validates error handling for OpenAI, Google AI, Anthropic, and other LLM providers Related to PR coleam00#720 TypeScript strict mode compliance --------- Co-authored-by: OmniNode CI <noreply@omninode.ai>
coleam00
pushed a commit
that referenced
this pull request
Apr 7, 2026
#721) Message created_at was parsed as local time while workflow started_at used ensureUtc (UTC). For users east of UTC, this timezone mismatch caused the startedAt filter to exclude all messages, resulting in empty workflow execution logs. Co-authored-by: Thomas Ritter <thomas.ritter@crownpeak.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Tyone88
pushed a commit
to Tyone88/Archon
that referenced
this pull request
Apr 16, 2026
…am00#720) (coleam00#721) Message created_at was parsed as local time while workflow started_at used ensureUtc (UTC). For users east of UTC, this timezone mismatch caused the startedAt filter to exclude all messages, resulting in empty workflow execution logs. Co-authored-by: Thomas Ritter <thomas.ritter@crownpeak.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
joaobmonteiro
pushed a commit
to joaobmonteiro/Archon
that referenced
this pull request
Apr 26, 2026
…am00#720) (coleam00#721) Message created_at was parsed as local time while workflow started_at used ensureUtc (UTC). For users east of UTC, this timezone mismatch caused the startedAt filter to exclude all messages, resulting in empty workflow execution logs. Co-authored-by: Thomas Ritter <thomas.ritter@crownpeak.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Resolves TypeScript strict mode errors in
providerErrorHandler.tsby implementing proper type guards and type-safe property access patterns.Changes Made
ErrorWithStatusandErrorWithMessageinterfaces for type safetyhasStatusProperty()andhasMessageProperty()for safe property accessTechnical Details
Test Results
✅ TypeScript compilation: No errors in strict mode
✅ Biome linting: Clean with no warnings
✅ Functionality tests: All 11 tests passing
✅ Error handling: Maintains all existing behavior patterns
Files Changed
archon-ui-main/src/features/knowledge/utils/providerErrorHandler.tsFixes #686
Test plan