petscan_rs icon indicating copy to clipboard operation
petscan_rs copied to clipboard

An option to enable logging http requests and responses

Open maximmasiutin opened this issue 1 year ago • 2 comments

I am trying to install PetScan on my instance, but it always gives an error "No result for source categories". I don't see what happens behind the scene. Please consider adding an option to enable logging http requests and responses, so that we could see the source of errors.

maximmasiutin avatar Dec 30 '23 04:12 maximmasiutin

In #153 I propose to start using tracing to ease debugging. It could be extended to log results of HTTP requests as well.

1-Byte avatar Jan 06 '24 11:01 1-Byte

I used the latest version of petscan_rs sources from the repository, and now I'm getting proper error messages, such as:

2024-01-24T08:51:56.772295Z ERROR run:get_wiki_db_connection{wiki="enwiki"}: petscan_rs::app_state: error=Io(Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }))
2024-01-24T08:51:56.772437Z  INFO run: petscan_rs::platform: error=Io(Io(Custom { kind: Uncategorized, error: "failed to lookup address information: Name or service not known" }))
Platform::get_response: No result

maximmasiutin avatar Jan 24 '24 08:01 maximmasiutin