Civi::pipe - Define option `apiError`
authorTim Otten <totten@civicrm.org>
Wed, 15 Dec 2021 01:53:09 +0000 (17:53 -0800)
committerTim Otten <totten@civicrm.org>
Thu, 13 Jan 2022 21:15:00 +0000 (13:15 -0800)
commitf1ab7a2e4934012677027ccc76136f132663b7d7
tree979dc9d7f2de7bd0ac051f8f411ce0a5bde3a2f5
parent1e88220aad73cb323dbf13e8b64e650801c7d1f7
Civi::pipe - Define option `apiError`

This option balances two interests:

- For generic plumbing code, it's easier to keep the API errors in their canonical format.
- For bespoke JSON-RPC client code, it's easier to bind errors into JSON-RPC errors. This way
  downstream clients can adapt the errors to their own convention (PHP exceptions, JS exceptions,
  promise-failures, ad nauseum)
Civi/Pipe/PublicMethods.php
tests/phpunit/Civi/Pipe/JsonRpcSessionTest.php