Handling requests exceptions with friendly error messages
This will add friendly error messages for the users of safety.
This covers requests exceptions: ConnectionError, Timeout and generic RequestException, also there is a handling for Bad HTTP codes with a custom message.
a few screenshots about how it looks:
Codecov Report
Merging #338 (593b50a) into master (d8609b9) will decrease coverage by
0.47%. The diff coverage is67.85%.
@@ Coverage Diff @@
## master #338 +/- ##
==========================================
- Coverage 69.51% 69.03% -0.48%
==========================================
Files 8 8
Lines 538 562 +24
==========================================
+ Hits 374 388 +14
- Misses 164 174 +10
| Impacted Files | Coverage Δ | |
|---|---|---|
| safety/cli.py | 52.45% <10.00%> (-4.18%) |
:arrow_down: |
| safety/errors.py | 100.00% <100.00%> (ø) |
|
| safety/safety.py | 92.90% <100.00%> (-0.28%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update d8609b9...593b50a. Read the comment docs.
Yeison, could you please terminate all lines with a period?
For example: "Our engineers are working quickly to resolve the issue." instead of "Our engineers are working quickly to resolve the issue"
"Our engineers are working quickly to resolve the issue"
Sure!