Monday, 23 August 2021

Return custom error on hyperledger sawtooth transaction processor

I'm using the python sdk to develop a custom transaction processor por hyperledger sawtooth.

Is it possible to return a custom error to the client that requested the transaction? How is the client supposed to know the reason that a transaction has not been processed?

I need to return an error from within the apply() method when the transaction cannot be completed due to any validation error, so the client that made the request can have some feedback about the error to show it to the user.

def apply(self, transaction, context):

In the examples I've checked the code raises an exception, but this ends the processor execution.

Any idea how can I do it?



from Return custom error on hyperledger sawtooth transaction processor

No comments:

Post a Comment