labthings / labthings/labthings-fastapi

Recoverable errors

Open
#271 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
9
Forks
4
PR merge metrics
No merged PRs in 30d

Description

There are a few places where we have a choice between raising an error, or logging the error and carrying on. It would be lovely to be able to specify which of these cases should fail with an exception, and which should log an error and continue. Currently I think this just applies to loading settings, specifically:

  • Settings files that are missing or corrupt
  • Settings that don't validate

There are solid use cases for both behaviours: testing code wants to be strict, and it's probably a good idea to raise exceptions rather than rely on the logs being checked every time. In everyday use, it might be less irritating if recoverable errors loading the settings were recovered from. In production code, it probably depends on whether you prioritise minimising errors, or ensuring everything's either working properly or not working...

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named. Start by locating the settings-loading and validation entry points, then determine how strict and recoverable modes should be selected for missing or corrupt files and invalid settings. Done means both behaviors are defined and covered for each listed settings error.

Written by the indexing model from the issue text.

Assessment

Tech stack
fastapi, python
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.