thoth-station / user-api

Web Service exposing Thoth functions to the RESTful worlds
https://thoth-station.github.io/
GNU General Public License v3.0
8 stars 18 forks source link

[2pt] ExtraParameterProblem /api/v1.thoth_user_api_api_v1_list_python_package_versions #1794

Closed mayaCostantini closed 2 years ago

mayaCostantini commented 2 years ago

Describe the bug As a user when I extend the API request with additional information. Following error is sent as an response. From https://sentry.io/share/issue/167ef7677bb447c7bc9d252b8124ae82/

'page', 
'per_page'
]

With values page : -1 and per_page : 25

Environment: aws-prod

To Reproduce See error report on Sentry

mayaCostantini commented 2 years ago

/sig stack-guidance /priority important-soon

codificat commented 2 years ago

Doing a quick test:

pep@uio ~ $ http 'https://khemenu.thoth-station.ninja/api/v1/python/package/versions?name=pandas&page=3'
HTTP/1.1 400 BAD REQUEST
access-control-allow-origin: *
content-length: 119
content-type: application/problem+json
date: Mon, 12 Sep 2022 12:12:20 GMT
server: gunicorn
set-cookie: 99770cb82864be05282857f803e02327=4ed33bdc4b733c9d0f3e4a4e27c88554; path=/; HttpOnly; Secure; SameSite=None
x-thoth-search-ui-url: https://thoth-station.ninja/search/
x-thoth-version: 0.35.5
x-user-api-service-version: 0.35.5+messaging.0.16.2.storages.0.73.0.common.0.36.4.python.0.16.10

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

Acceptance criteria

harshad16 commented 2 years ago

/triage accepted