(errMsg: string)
| 498 | } |
| 499 | |
| 500 | function getApiDecodeErrMsg(errMsg: string): string { |
| 501 | const decodedErrMsgs = [ |
| 502 | 'Unable to decode', |
| 503 | 'failed decoding', |
| 504 | 'unknown type', |
| 505 | ]; |
| 506 | |
| 507 | if (!decodedErrMsgs.find((decodedErrMsg) => errMsg.includes(decodedErrMsg))) { |
| 508 | return ''; |
| 509 | } |
| 510 | |
| 511 | return ( |
| 512 | `\nThis is because the block cannot be decoded. To solve this you can either:` + |
| 513 | '\n* Skip the block' + |
| 514 | '\n* Update the chain types. You can test this by viewing the block with https://polkadot.js.org/apps/' + |
| 515 | '\nFor further information please read the docs: https://academy.subquery.network/' |
| 516 | ); |
| 517 | } |
no test coverage detected