Skip to content

fix: add fallback guards to dictionary search for better error handling#358

Merged
jackwener merged 1 commit intomainfrom
fix/dictionary-search-fallback
Mar 24, 2026
Merged

fix: add fallback guards to dictionary search for better error handling#358
jackwener merged 1 commit intomainfrom
fix/dictionary-search-fallback

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Summary

Follow-up for PR #241 review feedback. Adds missing fallback guards to dictionary search to match the error handling pattern used in synonyms and examples.

Changes

  • type: Returns 'N/A' when no partOfSpeech is available
  • definition: Returns 'No definition found in API.' when no definition is available

This prevents crashes when API returns sparse payload or incomplete word entries.

Test: 233 tests pass.

🤖 Generated with Claude Code

@jackwener jackwener merged commit 9018713 into main Mar 24, 2026
10 of 13 checks passed
@jackwener jackwener deleted the fix/dictionary-search-fallback branch March 24, 2026 12:05
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.

1 participant