Validate Weather API endpoints and retries
This commit is contained in:
@@ -45,7 +45,7 @@ All omitted fields use their built-in defaults.
|
||||
|
||||
| Field | Default | Rules |
|
||||
| --- | --- | --- |
|
||||
| `base_url` | empty | Absolute Weather API URL. Required for collection and generation. |
|
||||
| `base_url` | empty | Absolute HTTP(S) Weather API URL. Required for collection and generation. |
|
||||
| `timeout` | `10s` | Must be greater than zero. |
|
||||
| `precision` | `0` | Must be zero or greater. Sent as the Weather API precision query value. |
|
||||
| `units` | `us` | Required Weather API units query value; `--units` overrides it for one command. |
|
||||
|
||||
@@ -9,9 +9,9 @@ are documented in [Weather data internals](../internal/weather-data.md) and
|
||||
|
||||
## Base URL And Requests
|
||||
|
||||
`weather_api.base_url` must be an absolute URL. Weatherreporter joins each
|
||||
endpoint path to the configured base URL path, so a service hosted under a path
|
||||
prefix must keep that prefix available. Requests use `GET` and carry the
|
||||
`weather_api.base_url` must be an absolute HTTP(S) URL. Weatherreporter joins
|
||||
each endpoint path to the configured base URL path, so a service hosted under a
|
||||
path prefix must keep that prefix available. Requests use `GET` and carry the
|
||||
configured timeout on every HTTP attempt.
|
||||
|
||||
Every request sends `format` and, except where noted below, `units`. The
|
||||
|
||||
@@ -11,10 +11,10 @@ semantics belong in [weather-data internals](weather-data.md).
|
||||
`config.Config`. It constructs the Weather API adapter from that configuration,
|
||||
calls `FetchBundle`, and returns `Result{Bundle: *weatherdata.Bundle}`.
|
||||
|
||||
The package wraps adapter construction failures as weather-collection setup
|
||||
errors and fetch failures as bundle-collection errors. It does not retry,
|
||||
persist, select reports, derive facts, build modules, invoke Promptkit, or
|
||||
notify Distributor.
|
||||
The package wraps adapter construction failures, including an invalid Weather
|
||||
API base URL, as weather-collection setup errors and fetch failures as
|
||||
bundle-collection errors. It does not retry, persist, select reports, derive
|
||||
facts, build modules, invoke Promptkit, or notify Distributor.
|
||||
|
||||
## Application Composition
|
||||
|
||||
|
||||
Reference in New Issue
Block a user