Skip to content

Add config validation with helpful error messages #23

@pgagnidze

Description

@pgagnidze

Currently, updo only provides basic TOML parsing errors when configuration files are malformed or contain invalid values. Users often struggle with cryptic error messages that don't clearly indicate what needs to be fixed.

Current behavior

When a config file has issues like invalid URLs, out-of-range timeouts, or malformed headers, users see generic parsing errors that require guesswork to resolve.

Proposed improvements

Add comprehensive validation that checks:

  • URL format validation (valid schemes, reachable hosts)
  • Numeric range validation (timeout > 0, refresh_interval > 0)
  • HTTP method validation (GET, POST, PUT, DELETE, etc.)
  • Header format validation (key: value pairs)
  • Required field presence

Expected outcome

Clear, actionable error messages that tell users exactly what's wrong and how to fix it, improving the initial setup experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions