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

ringcentral / ringcentral-python / 137

pending completion
137

Pull #52

travis-ci-com

web-flow
<a href="https://github.com/ringcentral/ringcentral-python/commit/<a class=hub.com/ringcentral/ringcentral-python/commit/fa63f7d103e5fb2475648894493dd9a4c5b050cf">fa63f7d10<a href="https://github.com/ringcentral/ringcentral-python/commit/fa63f7d103e5fb2475648894493dd9a4c5b050cf">">Merge </a><a class="double-link" href="https://github.com/ringcentral/ringcentral-python/commit/<a class="double-link" href="https://github.com/ringcentral/ringcentral-python/commit/c1d403a440110c263963b02d55c6e5350a5b460b">c1d403a44</a>">c1d403a44</a><a href="https://github.com/ringcentral/ringcentral-python/commit/fa63f7d103e5fb2475648894493dd9a4c5b050cf"> into 1b2c739d5">1b2c739d5</a>
Pull Request #52: removed accept header so to also work for binary response

1 of 1 new or added line in 1 file covered. (100.0%)

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

© 2026 Coveralls, Inc