Violation
try {
const response = await this.ctx.http.get(`${this.baseUrl}/markets/${marketId}/orderbook`, {
params: { network_id: Number(networkId), outcome },
headers: this.ctx.getHeaders(),
});
const data = response.data;
if (data.error) return null;
return { bids: data.bids || [], asks: data.asks || [] };
} catch {
return null;
}
Location
core/src/exchanges/myriad/fetcher.ts:203
Why It Matters
Any HTTP error, network timeout, or JSON parse failure in the Myriad orderbook fetch is silently swallowed. The caller receives null with no indication that something went wrong. In production, a Myriad API outage or a breaking protocol change would be completely invisible — the exchange would appear to return empty books rather than raising an error.
Suggested Fix
} catch (err) {
logger.warn('MyriadFetcher: fetchRawOutcomeOrderBook failed', { marketId, error: String(err) });
return null;
}
Found by automated code hygiene audit
Violation
Location
core/src/exchanges/myriad/fetcher.ts:203Why It Matters
Any HTTP error, network timeout, or JSON parse failure in the Myriad orderbook fetch is silently swallowed. The caller receives
nullwith no indication that something went wrong. In production, a Myriad API outage or a breaking protocol change would be completely invisible — the exchange would appear to return empty books rather than raising an error.Suggested Fix
Found by automated code hygiene audit