MCPcopy Index your code
hub / github.com/pmxt-dev/pmxt / mapNotFoundError

Method mapNotFoundError

core/src/exchanges/metaculus/errors.ts:26–34  ·  view source on GitHub ↗
(message: string, _data: unknown)

Source from the content-addressed store, hash-verified

24 }
25
26 protected override mapNotFoundError(message: string, _data: unknown): NotFound {
27 const lower = message.toLowerCase();
28 if (lower.includes('question') || lower.includes('market')) {
29 const match = message.match(/[\d]+/);
30 const id = match ? match[0] : 'unknown';
31 return new MarketNotFound(id, this.exchangeName);
32 }
33 return new NotFound(message, this.exchangeName);
34 }
35
36 protected override mapBadRequestError(message: string, data: unknown): BadRequest {
37 const lower = message.toLowerCase();

Callers

nothing calls this directly

Calls 1

matchMethod · 0.45

Tested by

no test coverage detected