Skip to content

Commit 8452d88

Browse files
committed
fix: Missing port in sentry events loading
1 parent 5600376 commit 8452d88

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

sentry_events/src/main.rs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,15 +79,21 @@ fn load_events(url: &str, token: &str, target: &str, runs: &HashMap<String, Path
7979
println!("Loading: {}", target);
8080
let client = reqwest::blocking::Client::new();
8181
let mut count = 1;
82-
if let (Some(mut next), true) = make_call(
82+
let parsed = reqwest::Url::parse(url).expect("Invalid URL");
83+
if let (Some(next), true) = make_call(
8384
&client,
8485
&format!("{}api/0/projects/sentry/{}/events/?full=true", url, target),
8586
token,
8687
runs,
8788
) {
89+
let mut next = reqwest::Url::parse(&next).expect("Invalid URL");
90+
next.set_port(parsed.port()).expect("Invalid port");
91+
let mut next = next.to_string();
8892
while let (Some(nxt), true) = make_call(&client, &next, token, runs) {
8993
println!("{} call #{}", target, count);
90-
next = nxt;
94+
let mut nxt = reqwest::Url::parse(&nxt).expect("Invalid URL");
95+
nxt.set_port(parsed.port()).expect("Invalid port");
96+
next = nxt.to_string();
9197
count += 1;
9298
}
9399
println!("Finished {}!", target);

0 commit comments

Comments
 (0)