(error: Error)
| 16 | * @param error The underlying error from Squirrel. |
| 17 | */ |
| 18 | export function parseError(error: Error): Error | null { |
| 19 | if (squirrelMissingRegex.test(error.message)) { |
| 20 | return new Error( |
| 21 | 'The application is missing a dependency it needs to check and install updates. This is very, very bad.' |
| 22 | ) |
| 23 | } |
| 24 | if (squirrelDNSRegex.test(error.message)) { |
| 25 | return new Error( |
| 26 | 'GitHub Desktop was not able to contact the update server. Ensure you have internet connectivity and try again.' |
| 27 | ) |
| 28 | } |
| 29 | if (squirrelTimeoutRegex.test(error.message)) { |
| 30 | return new Error( |
| 31 | 'GitHub Desktop was not able to check for updates due to a timeout. Ensure you have internet connectivity and try again.' |
| 32 | ) |
| 33 | } |
| 34 | |
| 35 | return null |
| 36 | } |
no outgoing calls
no test coverage detected