Skip to content

Conversation

@owtaylor
Copy link
Collaborator

The errata API route /packages/ doesn't work when includes a . (it returns an internal server error). However, we can use /packages?name= to get the same data.

(I asked the Errata Tool maintainer about this, and apparently this type of error is an artifact of Ruby-on-Rails
routing and hard to fix.)

The errata API route /packages/<name> doesn't work when <name>
includes a `.` (it returns an internal server error). However,
we can use /packages?name=<name> to get the same data.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the Errata API call for fetching package information to use query parameters instead of embedding the package name in the URL path. This is a good change as it correctly handles package names with special characters like periods.

However, I've found a critical issue in the implementation. The new code assumes the API returns a single object, but based on conventions and other parts of the codebase, it's highly likely that a filtered API call returns a list of objects. My review includes a comment with a suggested fix to handle the list response correctly, preventing a runtime error.

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