Commit f7be600
committed
fix(openqa-list-incidents): replace asserts with error handling
Motivation:
Using 'assert' for runtime validation is discouraged as they can be optimized
away and provide poor error messages to the user.
Design Choices:
- Replaced 'assert' calls in 'get_api_url' with explicit checks that call
'sys.exit' with descriptive error messages.
Benefits:
More robust error handling and improved user feedback when unexpected API
results occur.1 parent 8ca8bf3 commit f7be600
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
213 | 213 | | |
214 | 214 | | |
215 | 215 | | |
216 | | - | |
| 216 | + | |
| 217 | + | |
217 | 218 | | |
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
221 | 222 | | |
222 | | - | |
| 223 | + | |
| 224 | + | |
223 | 225 | | |
224 | 226 | | |
225 | 227 | | |
| |||
0 commit comments