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

Add DEBUG log for each URL that Commons app attempts to fetch #5723

Open
mnalis opened this issue May 11, 2024 · 0 comments
Open

Add DEBUG log for each URL that Commons app attempts to fetch #5723

mnalis opened this issue May 11, 2024 · 0 comments

Comments

@mnalis
Copy link
Contributor

mnalis commented May 11, 2024

What is the user problem or growth opportunity you want to see solved?

It would help debugging the various issues related to using API to WikimediaCommons servers.
This is a followup to #5225 (comment)

How do you know that this problem exists today? Why is this important?

Well, it existed in 4.1.0, but I have not seen changelog or comment in #5225 mentioning it has been improved in the meantime.
It is important as a lot of time and effort is wasted trying to separate temporary network or server issues from actual Commons app bugs and trying to reproduce the issue.

Who will benefit from it?

Primarily people triaging (or attempting to solve) the bug reports, but also advanced users who can read logs and determine where problem should be reported (i.e. is it server issue or Commons app issue)

Anything else you would like to add?

error seems to be of the format

2023-06-18 02:19:54,137     [ERROR] [file-logging-thread-1] [OkHttpConnectionFactory$UnsuccessfulResponseInterceptor] : java.io.IOException: {"error":{"code":"cirrussearch-backend-error","info":"We could not complete your search due to a temporary problem. Please try again later.","docref":"See https://commons.wikimedia.org/w/api.php for API usage. Subscribe to the mediawiki-api-announce mailing list at <https://lists.wikimedia.org/postorius/lists/mediawiki-api-announce.lists.wikimedia.org/> for notice of API deprecations and breaking changes."},"servedby":"mw1449"}

Which would be much more useful if it was logged with DEBUG priority prior to this actual HTTP call (with params) that app is actually doing when it receives that error... E.g. line with something like:

[DEBUG] doing HTTP GET https://commons.wikimedia.org/w/api.php?action=opensearch&format=json&formatversion=2&namespace=14&limit=10&search=franjo%20tu%C4%91man
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
@mnalis and others