Feature/chain status api (#5539)
* nym-api endpoint to return latest block information * attached chain health to health query * fixed serde casing * one of the most nastiest work arounds in test code
This commit is contained in:
committed by
GitHub
parent
128f69a5d6
commit
4f7124e661
@@ -14,6 +14,7 @@ use nym_contracts_common::NaiveFloat;
|
||||
use nym_mixnet_contract_common::reward_params::Performance;
|
||||
use nym_mixnet_contract_common::{IdentityKey, NodeId};
|
||||
use nym_serde_helpers::date::DATE_FORMAT;
|
||||
use nym_validator_client::nyxd::error::NyxdError;
|
||||
use reqwest::StatusCode;
|
||||
use schemars::JsonSchema;
|
||||
use serde::{Deserialize, Serialize};
|
||||
@@ -452,6 +453,15 @@ impl From<RedemptionError> for AxumErrorResponse {
|
||||
}
|
||||
}
|
||||
|
||||
impl From<NyxdError> for AxumErrorResponse {
|
||||
fn from(value: NyxdError) -> Self {
|
||||
Self {
|
||||
message: RequestError::new(value.to_string()),
|
||||
status: StatusCode::INTERNAL_SERVER_ERROR,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
pub enum NymApiStorageError {
|
||||
#[error("could not find status report associated with mixnode {mix_id}")]
|
||||
|
||||
Reference in New Issue
Block a user