kopia lustrzana https://github.com/bugout-dev/moonstream
If try except order change
rodzic
f8c7de63a0
commit
4f17dfa998
|
@ -42,22 +42,22 @@ async def add_subscription_handler(
|
|||
"""
|
||||
token = request.state.token
|
||||
|
||||
try:
|
||||
if subscription_type_id != "ethereum_whalewatch":
|
||||
if subscription_type_id != "ethereum_whalewatch":
|
||||
try:
|
||||
checksum_address = web3.toChecksumAddress(address)
|
||||
except ValueError as e:
|
||||
raise MoonstreamHTTPException(
|
||||
status_code=400,
|
||||
detail=str(e),
|
||||
internal_error=e,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to convert address to checksum address")
|
||||
raise MoonstreamHTTPException(
|
||||
status_code=500,
|
||||
internal_error=e,
|
||||
detail="Currently unable to convert address to checksum address",
|
||||
)
|
||||
except ValueError as e:
|
||||
raise MoonstreamHTTPException(
|
||||
status_code=400,
|
||||
detail=str(e),
|
||||
internal_error=e,
|
||||
)
|
||||
except Exception as e:
|
||||
logger.error(f"Failed to convert address to checksum address")
|
||||
raise MoonstreamHTTPException(
|
||||
status_code=500,
|
||||
internal_error=e,
|
||||
detail="Currently unable to convert address to checksum address",
|
||||
)
|
||||
|
||||
active_subscription_types_response = subscription_types.list_subscription_types(
|
||||
active_only=True
|
||||
|
|
Ładowanie…
Reference in New Issue