Skip to content

Exceptions encountered when running jobs locally give misleading error messages #347

@evansd

Description

@evansd

Meta note: I'm creating this issue here because the job-runner repo is no longer concerned with running jobs locally and the CLI is now technically the system which "owns" this.

When encountering an unhandled exception locally (e.g. because a user has an output file open in Excel which cannot therefore be overwritten) the message we display is the same as for production:

generate_gbs_estimates: Extracting output file: output/gbs/gbs_individuals_any_dx.csv
generate_gbs_estimates: Internal error: this usually means a platform issue rather than a problem for users to fix.
The tech team are automatically notified of these errors and will be investigating.
[WinError 5] Access is denied: 'C:\\repos\\gbd-estimates\\output\\gbs\\gbs_individuals_any_dx.csv.0cc0b1fb549b797f.tmp' -> 'C:\\repos\\gbd-estimates\\output\\gbs\\gbs_individuals_any_dx.csv'

These lines in particular are the opposite of helpful:

Internal error: this usually means a platform issue rather than a problem for users to fix.
The tech team are automatically notified of these errors and will be investigating.

This is part of a more general issue which is that no we're no longer trying to get a single codebase to do double duty for both production and local jobs we have the option to substantially rework how local jobs are run to make things easier for users.

Raised by @wjchulme in this thread:
https://bennettoxford.slack.com/archives/C069YDR4NCA/p1751636334737689?thread_ts=1751636286.824579&cid=C069YDR4NCA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions