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

Clinical-Genomics / trailblazer / 11681030687

05 Nov 2024 09:16AM UTC coverage: 88.24%. First build
11681030687

Pull #501

github

henrikstranneheim
feat(update): Werkzeug
Pull Request #501: feat(update): Werkzeug

2056 of 2330 relevant lines covered (88.24%)

0.88 hits per line

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

66.67
/trailblazer/clients/slurm_api_client/error_handler.py
1
from functools import wraps
1✔
2
import logging
1✔
3

4
from pydantic import ValidationError
1✔
5
from requests import HTTPError
1✔
6

7

8
from trailblazer.exc import ResponseDeserializationError, SlurmAPIClientError
1✔
9

10
LOG = logging.getLogger(__name__)
1✔
11

12

13
def handle_errors(func):
1✔
14
    @wraps(func)
1✔
15
    def wrapper(*args, **kwargs):
1✔
16
        try:
1✔
17
            return func(*args, **kwargs)
1✔
18
        except HTTPError as e:
×
19
            LOG.error(f"Error for request in slurm API client: {e.response.content}")
×
20
            raise SlurmAPIClientError()
×
21
        except ValidationError as e:
×
22
            LOG.error(f"Error deserializing slurm API response: {e}")
×
23
            raise ResponseDeserializationError()
×
24

25
    return wrapper
1✔
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