Function
isCompositionAssetError
(msg: string, name: string | null)
Source from the content-addressed store, hash-verified
| 24 | |
| 25 | // fallow-ignore-next-line complexity |
| 26 | function isCompositionAssetError(msg: string, name: string | null): boolean { |
| 27 | if (msg.includes("Error fetching") && (msg.includes("404") || msg.includes("Not Found"))) |
| 28 | return true; |
| 29 | if (name === "EncodingError" || msg.includes("unsupported or unrecognizable format")) return true; |
| 30 | if (msg.includes("MEDIA_ERR_SRC_NOT_SUPPORTED")) return true; |
| 31 | return false; |
| 32 | } |
| 33 | |
| 34 | const ERROR_CAP = 50; |
| 35 | let errorCount = 0; |
Tested by
no test coverage detected