(error: unknown)
| 147 | } |
| 148 | |
| 149 | function errorMessage(error: unknown) { |
| 150 | if ( |
| 151 | typeof error === "object" && |
| 152 | error !== null && |
| 153 | "data" in error && |
| 154 | typeof error.data === "object" && |
| 155 | error.data !== null && |
| 156 | "message" in error.data && |
| 157 | typeof error.data.message === "string" |
| 158 | ) { |
| 159 | return error.data.message |
| 160 | } |
| 161 | return error instanceof Error ? error.message : String(error) |
| 162 | } |
| 163 | |
| 164 | function isVersionGreater(left: string, right: string) { |
| 165 | const parse = (value: string) => { |