File: exceptions.py

package info (click to toggle)
python-aioqsw 0.4.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 204 kB
  • sloc: python: 1,680; makefile: 4
file content (31 lines) | stat: -rw-r--r-- 655 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
"""QNAP QSW library exceptions."""

from __future__ import annotations


class QswError(Exception):
    """Base class for aioqsw errors."""


class APIError(QswError):
    """Exception raised when API fails."""


class APITimeout(QswError):
    """Exception raised when API timeouts."""


class InternalServerError(APIError):
    """Exception raised when API returns internal server error."""


class InvalidHost(QswError):
    """Exception raised when invalid host is requested."""


class InvalidResponse(QswError):
    """Exception raised when invalid response is received."""


class LoginError(QswError):
    """Exception raised when login fails."""