poor error message when offline
Describe the bug When semgrep is run offline with a registry config, the output doesn't clearly explain what's going on:
ine@MacBook-Pro-6 ~/D/r/semgrep (develop)> semgrep --config=auto
Fetching rules from https://semgrep.dev/registry.
[ERROR] Failed to download config from https://semgrep.dev/c/auto: HTTPSConnectionPool(host='semgrep.dev', port=443): Max
retries exceeded with url: /c/auto (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at
0x10f9fa920>: Failed to establish a new connection: [Errno 8] nodename nor servname provided, or not known'))
[ERROR] invalid configuration file found (1 configs were invalid)
Expected behavior A message that clearly explains "semgrep could not connect to semgrep.dev on port 443 (https); is your internet connection working, or check status.semgrep.dev" maybe?
Screenshots If applicable, add screenshots to help explain your problem.
What is the priority of the bug to you?
- [ ] P0: blocking your adoption of Semgrep or workflow
- [ ] P1: important to fix or quite annoying
- [x] P2: regular bug that should get fixed
Environment If not using semgrep.dev: are you running off docker, an official binary, a local build?
Use case What will fixing this bug enable for you?
This issue is synced in Linear at https://linear.app/r2c/issue/PA-1883/poor-error-message-when-offline. Note: this link is for r2c use only and is not accessible publicly.