feat(event-notifier): improve environment variable handling

- Fix deserialization error when parsing config from environment variables
- Add proper array format support for adapters configuration
- Update environment variable examples with correct format
- Improve documentation for configuration loading
- Implement helper functions for environment variable validation

This change fixes the "invalid type: map, expected a sequence" error
by ensuring proper formatting of array-type fields in environment variables.
This commit is contained in:
houseme
2025-04-22 20:31:38 +08:00
parent 15b6a426fb
commit e4453adf82
18 changed files with 345 additions and 261 deletions
+2 -1
View File
@@ -1,3 +1,4 @@
use config::ConfigError;
use thiserror::Error;
use tokio::sync::mpsc::error;
use tokio::task::JoinError;
@@ -35,7 +36,7 @@ pub enum Error {
#[error("Configuration error: {0}")]
ConfigError(String),
#[error("Configuration loading error: {0}")]
Figment(#[from] figment::Error),
Config(#[from] ConfigError),
}
impl Error {