Skip to content

Commit

Permalink
fix: pickle api err
Browse files Browse the repository at this point in the history
  • Loading branch information
BobTheBuidler committed Sep 6, 2023
1 parent 642ad3d commit bb4d8e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion yearn/special.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,10 @@ async def apy(self, _: ApySamples) -> Apy:

@eth_retry.auto_retry
async def tvl(self, block=None) -> Tvl:
data = requests.get("https://api.pickle.finance/prod/protocol/value").json()
try:
data = requests.get("https://api.pickle.finance/prod/protocol/value").json()
except requests.exceptions.SSLError as e:
raise ApyError("yvecrv-jar", "ssl error") from e
tvl = data[self.id]
return Tvl(tvl=tvl)

Expand Down

0 comments on commit bb4d8e7

Please sign in to comment.