graze/guzzle-jsonrpc — pull request #15 by adlawson (2014-10-06 14:27:09+00:00)
Title: Throw exception on RPC error

RPC errors are reported differently to HTTP errors and weren't previously handled automatically.
The subscriber in this PR throws an exception on error if it's added (not default to avoid breaking BC).

Enabling the subscriber is shown in the docs as such:
```php
request(123, 'method', ['key'=>'value']);
$request->getEmitter()->addSubscriber(new ErrorSubscriber());

// Send the request
try {
$client->send($request);
} catch (RequestException $e) {
die($e->getResponse()->getRpcErrorMessage());
}
```