thoth-station / search

Visualize Python package metadata and browse advisory results.
https://thoth-station.ninja/search
GNU General Public License v3.0
6 stars 4 forks source link

Can not obtain package infortmation #85

Closed codificat closed 2 years ago

codificat commented 2 years ago

Describe the bug

The search UI is currently unable to show information about individual packages.

To Reproduce Steps to reproduce the behavior:

  1. Go to https://thoth-station.ninja/search/
  2. Enter pandas as a package name (or any other package that is supposed to be known by Thoth)
  3. Click on Analize
  4. See error: Thoth does not know about that package

Expected behavior

Information about the requested package should be shown

Screenshots

Taking pandas as an example, the search UI checks this API call:

$ http 'https://khemenu.thoth-station.ninja/api/v1/python/package/versions?name=pandas&per_page=1'
HTTP/1.1 400 BAD REQUEST
access-control-allow-origin: *
content-length: 123
content-type: application/problem+json
date: Tue, 07 Jun 2022 21:02:02 GMT
server: gunicorn
set-cookie: 99770cb82864be05282857f803e02327=dc3a560c7c01a697dac473a08753a6f6; path=/; HttpOnly; Secure; SameSite=None
x-thoth-search-ui-url: https://thoth-station.ninja/search/
x-thoth-version: 0.35.2
x-user-api-service-version: 0.35.2+messaging.0.16.1.storages.0.72.1.common.0.36.2.python.0.16.10

{
    "detail": "Extra query parameter(s) per_page not in spec",
    "status": 400,
    "title": null,
    "type": "about:blank"
}
Gkrumbach07 commented 2 years ago

The issue is that the User API was changed resulting in errors when used. A Fix has been made, however a better solution for a future sprint would be to implement an error page that gives users the ability to contact devs with the exacts error and how to reproduce it. Integration tests with the API should also be used.