grimoirelab-perceval
grimoirelab-perceval copied to clipboard
[Client] Improve HTTP error log
Current if an HTTP error is thrown by an API the log print error.response.reason
as a result of
https://github.com/chaoss/grimoirelab-perceval/blob/7f4cceb1c2cf032309193854cf8e6b653a0cfd0c/perceval/client.py#L181
However, many times the actual reason for the error is returned in ``error.response.text`. A log message can be printed in case an exception is thrown. This will help users to easily debug the error and also possibly avoid the need of such checks:
https://github.com/chaoss/grimoirelab-perceval/blob/7f4cceb1c2cf032309193854cf8e6b653a0cfd0c/perceval/backends/core/groupsio.py#L214
https://github.com/chaoss/grimoirelab-perceval/blob/7f4cceb1c2cf032309193854cf8e6b653a0cfd0c/perceval/backends/core/pagure.py#L314
Thank you @animeshk08 for opening this issue and providing the fix.