Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed origins api for maven components throwing 500 error when invalid group id is provided #1176

Merged
merged 6 commits into from
Aug 22, 2024

Conversation

yashkohli88
Copy link
Contributor

Below are the tasks completed as a part of this fix -

  • Code updated to check if the value exist and test case added to verify the changes.
  • New Test cases added for happy paths and all the error scenarios.
  • Fixtures added for the input and one of the response.
  • getResponse function reads the fixture having response from maven repo for each query (group id or artefact id) converts it to json object and then it is passed to getSuggestions function from originMaven.js file.

List of testcases added in the origins.js file related to the changes -

  • Return suggestions when incomplete group id is provided as input
  • Return list of artefacts when complete group id is provided as input
  • Return blank response when group id is invalid and suggestions are not present
  • Return blank response when group id and artefact id are invalid and suggestions are not present

This fix is related to Issue 1167

Copy link
Collaborator

@elrayle elrayle left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for getting in all the thorough testing.

@elrayle elrayle marked this pull request as draft August 22, 2024 18:52
@elrayle elrayle marked this pull request as ready for review August 22, 2024 18:52
@elrayle elrayle merged commit 9a1cb7a into clearlydefined:master Aug 22, 2024
4 checks 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