Skip to content

Commit cf19a7d

Browse files
committed
Fix symbols request function
1 parent def7899 commit cf19a7d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/agent/services/lazer_exporter.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,9 @@ async fn fetch_symbols(history_url: &Url) -> Result<Vec<SymbolResponse>> {
138138
url.set_scheme("http").unwrap();
139139
url.set_path("/history/v1/symbols");
140140
let client = Client::new();
141-
let response = client.get(url).send().await?.text().await?;
142-
Ok(serde_json::from_str(&response)?)
141+
let response = client.get(url).send().await?.error_for_status()?;
142+
let data = response.json().await?;
143+
Ok(data)
143144
}
144145

145146
#[instrument(skip(config, state))]

0 commit comments

Comments
 (0)