improve error logging
This commit is contained in:
@@ -8,7 +8,7 @@ use agent_client::{
|
||||
},
|
||||
models::{ValidateAndReloadBody, ValidateBody, WriteConfigBody},
|
||||
};
|
||||
use tracing::warn;
|
||||
use tracing::{error, warn};
|
||||
|
||||
use crate::{configs::agent::AgentSettings, errors::service_error::ServiceError};
|
||||
|
||||
@@ -23,6 +23,7 @@ pub enum AgentError {
|
||||
|
||||
impl From<AgentError> for ServiceError {
|
||||
fn from(err: AgentError) -> Self {
|
||||
error!("Agent error occurred: {:?}", err);
|
||||
match err {
|
||||
AgentError::ValidationFailed(_internal, user) => ServiceError::InternalError(user),
|
||||
AgentError::ApplicationFailed(_internal, user) => ServiceError::InternalError(user),
|
||||
|
||||
Reference in New Issue
Block a user