Skip to content

feat(client): improve register command error handling#117

Merged
xia0pin9 merged 3 commits intopinterest:masterfrom
xia0pin9:feat/improve-register-command
Jan 14, 2026
Merged

feat(client): improve register command error handling#117
xia0pin9 merged 3 commits intopinterest:masterfrom
xia0pin9:feat/improve-register-command

Conversation

@xia0pin9
Copy link
Copy Markdown
Contributor

@xia0pin9 xia0pin9 commented Jan 8, 2026

Functional improvements:

  • Add validation: -g flag now requires -k to prevent crashes
  • Support uncached mode with -g -k for direct key fetching
  • Extract fetchAndPrintKey() function for better code organization
  • Improve timeout handling with proper deadline checks
  • Add comprehensive documentation for uncached mode behavior

Bug fixes:

  • Prevent crash when -g used without -k specified
  • Better error messages distinguishing 'daemon' vs 'server'

Code quality:

  • Apply log standardization (lowercase messages, %w wrapping)
  • Add detailed comments explaining timeout limitations
  • Improve code structure and readability

Tests pass independently of other log standardization changes.

Functional improvements:
- Add validation: -g flag now requires -k to prevent crashes
- Support uncached mode with -g -k for direct key fetching
- Extract fetchAndPrintKey() function for better code organization
- Improve timeout handling with proper deadline checks
- Add comprehensive documentation for uncached mode behavior

Bug fixes:
- Prevent crash when -g used without -k specified
- Better error messages distinguishing 'daemon' vs 'server'

Code quality:
- Apply log standardization (lowercase messages, %w wrapping)
- Add detailed comments explaining timeout limitations
- Improve code structure and readability

Tests pass independently of other log standardization changes.
@xia0pin9 xia0pin9 merged commit 761bdb5 into pinterest:master Jan 14, 2026
1 check passed
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.

2 participants