(response)
| 67 | |
| 68 | @staticmethod |
| 69 | def __raise_for_status(response): |
| 70 | if response.status_code >= 400: |
| 71 | try: |
| 72 | error = response.json()['error'] |
| 73 | except Exception: |
| 74 | response.raise_for_status() |
| 75 | else: |
| 76 | raise RequestError(error, response) |
| 77 | |
| 78 | |
| 79 | class RequestError(Exception): |
no test coverage detected