rpc: unify arg type error message #26069

pull furszy wants to merge 1 commits into bitcoin:master from furszy:2022_rpc_unify_error_type changing 6 files +13 −12
  1. furszy commented at 1:24 pm on September 12, 2022: member

    Decoupled from #25737 per request.

    We are throwing two different error descriptions for the same problematic:

    1. “Expected type {expected], got {type}” –> RPCTypeCheckArgument()
    2. “JSON value of type {type} is not of expected type {expected}” –> UniValue::checkType()
  2. RPC: unify arg type error message
    We were throwing two different errors for the same problematic:
    
    * "Expected type {expected], got {type}" --> RPCTypeCheckArgument()
    * "JSON value of type {type} is not of expected type {expected}" --> UniValue::checkType()
    2870a97121
  3. furszy renamed this:
    RPC: unify arg type error message
    rpc: unify arg type error message
    on Sep 12, 2022
  4. maflcko commented at 1:31 pm on September 12, 2022: member

    review ACK 2870a97121ebeb4750a8d72cd5f39d9600767bc4

    Makes sense to use the same error string that univalue uses internally. The univalue error string was most recently changed in fae5ce87950.

  5. DrahtBot added the label RPC/REST/ZMQ on Sep 12, 2022
  6. DrahtBot commented at 4:28 pm on September 12, 2022: contributor

    The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.

    Conflicts

    Reviewers, this pull request conflicts with the following ones:

    • #26039 (rpc: Return RPC_TYPE_ERROR, not RPC_MISC_ERROR on type mismatch (1/2) by MarcoFalke)
    • #25737 (rpc: remove redundant univalue type checks by furszy)

    If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.

  7. fanquake approved
  8. fanquake commented at 9:12 am on September 13, 2022: member
    ACK 2870a97121ebeb4750a8d72cd5f39d9600767bc4
  9. fanquake merged this on Sep 13, 2022
  10. fanquake closed this on Sep 13, 2022

  11. sidhujag referenced this in commit 6bc24d594c on Sep 13, 2022
  12. furszy deleted the branch on May 27, 2023
  13. bitcoin locked this on May 26, 2024

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2024-07-05 22:12 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me