When opening a channel, the rest module calls channel_open from the python module:
|
try: |
|
self.raiden_api.channel_open( |
|
registry_address, token_address, partner_address, settle_timeout |
|
) |
|
except ( |
|
InvalidBinaryAddress, |
|
InvalidSettleTimeout, |
|
SamePeerAddress, |
|
AddressWithoutCode, |
|
DuplicatedChannelError, |
|
TokenNotRegistered, |
|
) as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.CONFLICT) |
|
except (InsufficientFunds, InsufficientGasReserve) as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.PAYMENT_REQUIRED) |
However, the python module calls the proxy's set_total_deposit which means that RaidenRecoverableErrors will just bubble up with nothing to handle them.
|
channel_proxy.set_total_deposit(total_deposit=total_deposit, block_identifier=blockhash) |
The same thing happens when invoking the channel deposit directly:
|
try: |
|
self.raiden_api.set_total_channel_deposit( |
|
registry_address, |
|
channel_state.token_address, |
|
channel_state.partner_state.address, |
|
total_deposit, |
|
) |
|
except InsufficientFunds as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.PAYMENT_REQUIRED) |
|
except DepositOverLimit as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.CONFLICT) |
|
except DepositMismatch as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.CONFLICT) |
|
except TokenNetworkDeprecated as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.CONFLICT) |
|
except UnexpectedChannelState as e: |
|
return api_error(errors=str(e), status_code=HTTPStatus.CONFLICT) |
TODO
When opening a channel, the
restmodule callschannel_openfrom thepythonmodule:raiden/raiden/api/rest.py
Lines 639 to 653 in 6983c90
However, the python module calls the proxy's
set_total_depositwhich means thatRaidenRecoverableErrors will just bubble up with nothing to handle them.raiden/raiden/api/python.py
Line 701 in 6983c90
The same thing happens when invoking the channel deposit directly:
raiden/raiden/api/rest.py
Lines 1110 to 1126 in 6983c90
TODO
RaidenRecoverableErroris handled hereRaidenRecoverableErroris not handled.