• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ringcentral / ringcentral-python / 139

pending completion
139

push

travis-ci-com

DaKingKong
increase version number

550 of 615 relevant lines covered (89.43%)

1.79 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

84.62
/ringcentral/http/api_exception.py
1
#!/usr/bin/env python
2
# encoding: utf-8
3

4

5
class ApiException(Exception):
2✔
6
    def __init__(self, api_response, previous=None):
2✔
7
        self.__apiResponse = api_response
2✔
8

9
        message = previous.message if previous and hasattr(previous, 'message') else 'Unknown error'
2✔
10
        status = 0  # previous.status if previous else 0
2✔
11

12
        if api_response:
2✔
13

14
            if api_response.error():
2✔
15
                message = api_response.error()
2✔
16

17
            if api_response.response() and api_response.response().status_code:
2✔
18
                status = api_response.response().status_code
×
19

20
        super(ApiException, self).__init__(message)
2✔
21

22
    def api_response(self):
2✔
23
        return self.__apiResponse
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc