Skip to content

Conversation

@JoseRLopezE
Copy link

This PR introduces a new helper function, handleGfiResponse, to centralize and improve type validation and error handling for responses from the gfi function.

Ensures only valid arrays are processed, throwing clear errors for string error messages or unexpected response types.
Handles empty results gracefully with user-friendly messages.
Prepares the codebase for better testability and future maintenance.
Includes unit tests to verify all edge cases and error paths.
This change improves the reliability and user experience of the CLI when interacting with the GitHub API.

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