mirror of
https://github.com/NoFxAiOS/nofx.git
synced 2026-07-05 20:11:13 +08:00
go-hyperliquid's NewExchange auto-fetches meta/spotMeta/perpDexs and panics if any of those API calls fail (NewInfo: panic(err)). The quick trade flow constructs a probe trader inside POST /api/traders, so any transient Hyperliquid API hiccup crashed the request with a recovered panic and a bare 500. Wrap the constructor in initExchangeClient, which converts the panic into an error that surfaces through the existing exchange-probe validation path as an honest, retryable message.