You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The origins API is publicly exposed and can be used by everyone. We use these APIs particularly in UI where we try to find the component to harvest.
Expected Behavior:
The origins API for Pypi should return an empty response when the package searched is not found.
Observed:
The origins API for Pypi is currently throwing an unhandled error with status code 500 when the searched package is not found in the package manager. However the innererror statusCode is 404 and message is Not Found.
Steps to Reproduce:
Hit the endpoint https://dev-api.clearlydefined.io/origins/pypi/pand with a GET request where "pand" is the package being searched.
Observe the response, error code and error message.
Additional Information:
The statement on line 27 of the originPypi.js file calls for https://pypi.org/pypi/pand/json when we search for pand string in the pypi. It returns 404 status code with message Not found if the package searched is not present. We should handle this error response around this line and throw error only if other status codes are returned.
The text was updated successfully, but these errors were encountered:
Origins API for Pypi throwing 500 Error
The origins API is publicly exposed and can be used by everyone. We use these APIs particularly in UI where we try to find the component to harvest.
Expected Behavior:
The origins API for Pypi should return an empty response when the package searched is not found.
Observed:
The origins API for Pypi is currently throwing an unhandled error with status code 500 when the searched package is not found in the package manager. However the innererror statusCode is 404 and message is Not Found.
Steps to Reproduce:
https://dev-api.clearlydefined.io/origins/pypi/pand
with a GET request where "pand" is the package being searched.Additional Information:
The statement on line 27 of the originPypi.js file calls for
https://pypi.org/pypi/pand/json
when we search for pand string in the pypi. It returns 404 status code with message Not found if the package searched is not present. We should handle this error response around this line and throw error only if other status codes are returned.The text was updated successfully, but these errors were encountered: