Skip to content

Commit

Permalink
Debug
Browse files Browse the repository at this point in the history
  • Loading branch information
pawanjay176 committed Feb 11, 2025
1 parent e15d30e commit 733f17c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
1 change: 1 addition & 0 deletions builder-server/src/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,5 +114,6 @@ where
.as_ref()
.get_header(slot, parent_hash, pubkey)
.await;
tracing::info!("Got response from builder, constructing response");
build_response_with_headers(res, content_type, api_impl.as_ref().fork_name_at_slot(slot)).await
}
16 changes: 13 additions & 3 deletions common/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ where

let resp = match result {
Ok(body) => {
tracing::info!(
"Got a valid response from builder, content-type {:?}",
content_type
);
dbg!(
"Got a valid response from builder, content-type {:?}",
content_type
);
let mut response = response_builder.status(200);

if let Some(response_headers) = response.headers_mut() {
Expand Down Expand Up @@ -79,10 +87,12 @@ where
})?,
};

response.body(Body::from(body_content)).map_err(|e| {
let resp = response.body(Body::from(body_content)).map_err(|e| {
error!(error = ?e);
StatusCode::INTERNAL_SERVER_ERROR
})
});
dbg!(&resp);
resp
}
Err(body) => {
let mut response = response_builder.status(body.code);
Expand Down Expand Up @@ -363,7 +373,7 @@ where
}

// Headers
#[derive(Default, Clone, Copy)]
#[derive(Default, Clone, Copy, Debug)]
pub enum ContentType {
#[default]
Json,
Expand Down

0 comments on commit 733f17c

Please sign in to comment.