mirror of
https://github.com/sigp/lighthouse.git
synced 2026-03-21 13:54:44 +00:00
Restructured response builder to give YAML or JSON when SSZ is not available, not just JSON.
This commit is contained in:
@@ -62,6 +62,6 @@ pub fn get_prometheus<T: BeaconChainTypes + 'static>(req: Request<Body>) -> ApiR
|
||||
.unwrap();
|
||||
|
||||
String::from_utf8(buffer)
|
||||
.map(|string| ResponseBuilder::new(&req).body_text(string))
|
||||
.map(|string| ResponseBuilder::new(&req)?.body_text(string))
|
||||
.map_err(|e| ApiError::ServerError(format!("Failed to encode prometheus info: {:?}", e)))?
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user