(error: unknown)
| 83 | ]; |
| 84 | |
| 85 | export const isFinalViewRejection = (error: unknown): boolean => { |
| 86 | const errors = (error as Partial<ResponseError>)?.response?.errors; |
| 87 | const finalCodes = getFinalViewRejectionCodes(); |
| 88 | |
| 89 | return ( |
| 90 | Array.isArray(errors) && |
| 91 | errors.some((item) => finalCodes.includes(item?.extensions?.code as string)) |
| 92 | ); |
| 93 | }; |
| 94 | |
| 95 | // viewPost takes no read time: the API credits a replayed view to the moment |
| 96 | // it arrives. Only a view from the same local day lands on the day it was |
no test coverage detected