Failing Early on Invalid Configuration

Configuration errors are easier to diagnose when checked before an application begins unrelated work using assumptions about the settings.

Source
Anbloq
Language
English
Created
Updated
Chapters
2
Reading time
1 min
In this article2 chapters
  1. Trace a delayed symptom
  2. Separate absence from bad input

Trace a delayed symptom

If a negative interval is accepted at startup, a later scheduling loop may have no progressing time. Reject the invalid setting at the domain validation boundary and name its unit.

Separate absence from bad input

A default can apply when a value was omitted. A supplied negative interval still needs an explicit diagnostic. Configuration loading demonstrates the difference between a missing setting and an unusable one.[1]

References

  1. Python Software Foundation, Python Tutorial: Errors and Exceptions ↩