adafruit / adafruit/Adafruit_CircuitPython_Requests

Exceptions don't match CPython `requests` that closely

Open
#190 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
49
Forks
39
PR merge metrics
No merged PRs in 30d

Description

The CPython `requests` library has its own set of exceptions: https://requests.readthedocs.io/en/latest/api/#requests.ConnectTimeout
which are subclasses of system exceptions. Here is the source, showing the class definitions:
https://requests.readthedocs.io/en/latest/_modules/requests/exceptions/

I think using some subset of the `requests` exceptions might be nice for writing compatible code and one with clearer exceptions.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the CPython requests exception definitions and the linked ConnectTimeout API documentation, then compare them with this library’s current exception behavior. The issue does not specify which exceptions or compatibility rules to implement; done would require a decided subset and corresponding behavior that supports clearer, requests-compatible error handling.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.