Skip to content

[#666] Add RPC error response logs

Alyona Antonova requested to merge alyoanton9/#666-log-rpc-error-responses into master

Description

Problem: In cases where RPC responds with an error, we only throw the corresponding human-readable error, but don't log the response itself, although in some cases it would be useful for us to know what response is. They should be logged at the maximum verbosity level like the other json requests and responses info from RPC.

Solution: In runRequestAcceptStatusImpl, extract response from ClientError, log it like sucessful response, then throw the matching error.

Related issue(s)

Resolves #666 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Merge request reports