unclear error message while manipulating a dynamic family #40

Closed
opened 2025-08-28 15:57:33 +02:00 by gremond · 1 comment
Member

unclear help message

I encountered an unclear error message ("max depth exceeded") while manipulating a dynamic family.

rougail -v 1.1  -m structfile/proxy.yml
ERROR: maximum recursion depth exceeded

Here's my file:

        ---
        version: 1.1
        manual:
        
          use_for_https:
            description: Also use this proxy for HTTPS
            default: true
        
          "{{ identifier }}_proxy":
            description: "{{ identifier }} Proxy"
            dynamic:
              - HTTPS
              - SOCKS
            hidden:
              variable: manual.use_for_https
        
            address:
              description: "{{ identifier }} address"
              default:
                variable: manual.http_proxy.address
        
            port:
              description: "{{ identifier }} port"
              default:
                variable: manual.http_proxy.port         

Suddenly I realised that I didn't defined the manual.http_proxy.address and the manual.http_proxy.port.

If I add these definitions like this:

manual:
  description: Manual proxy configuration

  http_proxy:
    description: HTTP Proxy

    address:
      description: HTTP address
      type: domainname
      params:
        allow_ip: true

    port:
      description: HTTP Port
      type: port
      default: 8080

And the unclear error has disapeared (of course I have another error but no problem with this one:)

rougail -m structfile/proxy.yml
🛑 ERRORS
┗━━ The following variables are mandatory but have no value:
    ┗━━ manual.http_proxy.address (HTTP address)

My demand here is:

Is it possible to have a clear error message, somthing like: "http_proxy.address variable is not defined" instead of a "max depth exceeded" ?

## unclear help message I encountered an unclear error message ("max depth exceeded") while manipulating a dynamic family. ``` rougail -v 1.1 -m structfile/proxy.yml ERROR: maximum recursion depth exceeded ``` Here's my file: ``` --- version: 1.1 manual: use_for_https: description: Also use this proxy for HTTPS default: true "{{ identifier }}_proxy": description: "{{ identifier }} Proxy" dynamic: - HTTPS - SOCKS hidden: variable: manual.use_for_https address: description: "{{ identifier }} address" default: variable: manual.http_proxy.address port: description: "{{ identifier }} port" default: variable: manual.http_proxy.port ``` Suddenly I realised that I didn't defined the `manual.http_proxy.address` and the `manual.http_proxy.port`. If I add these definitions like this: ``` manual: description: Manual proxy configuration http_proxy: description: HTTP Proxy address: description: HTTP address type: domainname params: allow_ip: true port: description: HTTP Port type: port default: 8080 ``` And the unclear error has disapeared (of course I have another error but no problem with this one:) ``` rougail -m structfile/proxy.yml 🛑 ERRORS ┗━━ The following variables are mandatory but have no value: ┗━━ manual.http_proxy.address (HTTP address) ``` My demand here is: Is it possible to have a clear error message, somthing like: "http_proxy.address variable is not defined" instead of a "max depth exceeded" ?
Owner

Done: 9ee03b22bb

Done: https://forge.cloud.silique.fr/stove/rougail/commit/9ee03b22bb3548098c3aeab6a087f0bf239184e1
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: stove/rougail#40
No description provided.