| 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(); |