Feature/force refresh node (#5101)

* introduced nym-api endpoint for force refreshing described node data

* client code + updated return types

* nym-node to update self-described data cache on startup + change request type

* send request to all available nym-apis

* fixed 'is_stale' check
This commit is contained in:
Jędrzej Stuczyński
2024-11-06 09:17:44 +00:00
committed by GitHub
parent fd8dc63c88
commit c001059af9
15 changed files with 327 additions and 33 deletions
+14
View File
@@ -355,6 +355,13 @@ impl AxumErrorResponse {
}
}
pub(crate) fn unauthorised(msg: impl Display) -> Self {
Self {
message: RequestError::new(msg.to_string()),
status: StatusCode::UNAUTHORIZED,
}
}
pub(crate) fn unprocessable_entity(msg: impl Display) -> Self {
Self {
message: RequestError::new(msg.to_string()),
@@ -375,6 +382,13 @@ impl AxumErrorResponse {
status: StatusCode::BAD_REQUEST,
}
}
pub(crate) fn too_many(msg: impl Display) -> Self {
Self {
message: RequestError::new(msg.to_string()),
status: StatusCode::TOO_MANY_REQUESTS,
}
}
}
impl From<UninitialisedCache> for AxumErrorResponse {