Skip to content

feat(logging): improve error visibility and logging across application#96

Open
bencap wants to merge 1 commit intobugfix/bencap/protein-layer-generated-unnecessarilyfrom
feature/bencap/improved-error-visibility
Open

feat(logging): improve error visibility and logging across application#96
bencap wants to merge 1 commit intobugfix/bencap/protein-layer-generated-unnecessarilyfrom
feature/bencap/improved-error-visibility

Conversation

@bencap
Copy link
Copy Markdown
Collaborator

@bencap bencap commented Apr 16, 2026

This pull request introduces several improvements to error handling and logging throughout the codebase, especially for network/resource acquisition and alignment/mapping operations. It provides more detailed exception messages, standardized error reporting, and improved debugging information, making failures easier to diagnose and trace. Additionally, it introduces a custom database connection class with a longer timeout for UTA queries to reduce failures on long-running operations.

Error handling and logging improvements:

  • Added detailed logging with exception tracebacks to all major failure points, including BLAT parsing, external resource checks (UTA, SeqRepo, Gene Normalizer), and transcript/protein accession lookups, using _logger.exception and improved error messages for better traceability. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12]

  • Standardized error message formatting in ScoresetMapping and MappedScore objects to include both the exception type and message, improving output clarity for downstream consumers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]

Resource/network acquisition robustness:

  • Enhanced the request_with_backoff utility to log transient failures and server errors at each retry, and to raise a custom ResourceAcquisitionError (with the last exception as the cause) after exhausting all retries. [1] [2] [3] [4] [5]

Database connection improvements:

  • Introduced a _TimeoutUtaDatabase class that increases the command timeout for UTA database queries from 60 seconds to 5 minutes, reducing failures on long-running range queries. Updated the main lookup code to use this subclass. [1] [2]

Exception propagation and critical error logging:

  • Ensured exceptions are re-raised after logging and emitting error information, preventing silent failures and allowing for proper upstream handling. Also, improved critical error logging for resource acquisition failures. [1] [2]

These changes collectively make the codebase more robust, easier to debug, and more transparent in the face of errors and operational issues.

@bencap bencap marked this pull request as ready for review April 30, 2026 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant