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

Clinical-Genomics / cg / 11459145817

22 Oct 2024 11:24AM UTC coverage: 82.978%. First build
11459145817

Pull #3864

github

web-flow
Merge b594b179a into d11c7989e
Pull Request #3864: add application ordertype endpoint

70 of 85 new or added lines in 10 files covered. (82.35%)

19060 of 22970 relevant lines covered (82.98%)

1.01 hits per line

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

55.56
/cg/server/endpoints/error_handler.py
1
import logging
1✔
2
from functools import wraps
1✔
3
from http import HTTPStatus
1✔
4

5
from flask import jsonify
1✔
6

7
from cg.store.exc import EntryNotFoundError
1✔
8

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

11

12
def handle_missing_entries(func):
1✔
13
    @wraps(func)
1✔
14
    def wrapper(*args, **kwargs):
1✔
NEW
15
        try:
×
NEW
16
            return func(*args, **kwargs)
×
NEW
17
        except EntryNotFoundError as error:
×
NEW
18
            LOG.error(error)
×
NEW
19
            return jsonify(error=str(error)), HTTPStatus.NOT_FOUND
×
NEW
20
        except Exception as error:
×
NEW
21
            LOG.error(f"Unexpected error in endpoint: {error}")
×
NEW
22
            return (
×
23
                jsonify(error="An error occurred while processing your request."),
24
                HTTPStatus.INTERNAL_SERVER_ERROR,
25
            )
26

27
    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

© 2026 Coveralls, Inc