For now usages of JsonRpcError are hardcoded (i.e. in JsonRpcClient) and I need to fork them to use other error class (even if I'll use Humus\Amqp\JsonRpc\Error interface).
Im suggesting to implement JsonRpcErrorFactory class which will be used to create error objects.
In this case, I'll be able to handle error creation without deep forks and etc.
For now usages of JsonRpcError are hardcoded (i.e. in JsonRpcClient) and I need to fork them to use other error class (even if I'll use Humus\Amqp\JsonRpc\Error interface). Im suggesting to implement JsonRpcErrorFactory class which will be used to create error objects. In this case, I'll be able to handle error creation without deep forks and etc.