add description to http errors
This commit is contained in:
parent
955aa9dfc6
commit
18b827690f
4 changed files with 24 additions and 6 deletions
|
|
@ -1,4 +1,6 @@
|
|||
use eva::{logging as log, perfect_derive, component_configs::ComponentConfig, supervisor::SlaveRx};
|
||||
use eva::{
|
||||
component_configs::ComponentConfig, logging as log, perfect_derive, supervisor::SlaveRx,
|
||||
};
|
||||
|
||||
use eyre::Context;
|
||||
use viendesu_core::{
|
||||
|
|
@ -23,14 +25,20 @@ pub trait Types: Send + Sync + 'static {
|
|||
type Service: Service + Clone;
|
||||
}
|
||||
|
||||
pub async fn serve(rx: SlaveRx, config: ComponentConfig<Config>, router: axum::Router) -> eyre::Result<()> {
|
||||
pub async fn serve(
|
||||
rx: SlaveRx,
|
||||
config: ComponentConfig<Config>,
|
||||
router: axum::Router,
|
||||
) -> eyre::Result<()> {
|
||||
// TODO: use it.
|
||||
_ = rx;
|
||||
let config::Config {
|
||||
unencrypted,
|
||||
ssl: _,
|
||||
} = &*config;
|
||||
let unencrypted = unencrypted.as_ref().expect("SSL-only currently is not supported");
|
||||
let unencrypted = unencrypted
|
||||
.as_ref()
|
||||
.expect("SSL-only currently is not supported");
|
||||
|
||||
if !unencrypted.enable {
|
||||
return Ok(());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue