yaylib 1.5.0.dev2__tar.gz → 1.5.0.dev3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/PKG-INFO +1 -1
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/__init__.py +1 -1
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/errors.py +8 -3
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/LICENSE +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/README.md +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/pyproject.toml +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/__init__.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/auth.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/call.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/chat.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/group.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/misc.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/notification.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/post.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/review.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/thread.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/api/user.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/client.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/config.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/constants.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/device.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/models.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/responses.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/state.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/utils.py +0 -0
- {yaylib-1.5.0.dev2 → yaylib-1.5.0.dev3}/yaylib/ws.py +0 -0
|
@@ -22,6 +22,8 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
|
22
22
|
SOFTWARE.
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
|
+
from json.decoder import JSONDecodeError
|
|
26
|
+
|
|
25
27
|
import aiohttp
|
|
26
28
|
|
|
27
29
|
from .responses import ErrorResponse
|
|
@@ -583,9 +585,12 @@ async def raise_for_code(response: aiohttp.ClientResponse) -> None:
|
|
|
583
585
|
Raises:
|
|
584
586
|
ClientError:
|
|
585
587
|
"""
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
588
|
+
try:
|
|
589
|
+
response_json = await response.json(content_type=None)
|
|
590
|
+
if response_json is None:
|
|
591
|
+
return None
|
|
592
|
+
except JSONDecodeError:
|
|
593
|
+
return None
|
|
589
594
|
|
|
590
595
|
err = ErrorResponse(response_json)
|
|
591
596
|
if err.result is None or err.result != "error":
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|