Skip to content

Commit

Permalink
Avoid double reporting of server error (#144)
Browse files Browse the repository at this point in the history
  • Loading branch information
Liozou authored Oct 23, 2023
1 parent 50caaba commit 4235da1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/BugReporting.jl
Original file line number Diff line number Diff line change
Expand Up @@ -616,9 +616,15 @@ function get_upload_params()
push!(c, data)
end
end
errormonitor(t)
bind(c, t)
connectionId = take!(c)
connectionId = try
take!(c)
catch err
if !(err isa TaskFailedException)
errormonitor(t)
end
rethrow()
end

println("To upload a trace, please authenticate by visiting:\n")
println("\thttps://github.com/login/oauth/authorize?client_id=$GITHUB_APP_ID&state=$(HTTP.escapeuri(connectionId))")
Expand All @@ -632,6 +638,8 @@ function get_upload_params()
println()
println("Canceled uploading the trace.")
return
elseif !(err isa TaskFailedException)
errormonitor(t)
end
rethrow()
end
Expand Down

0 comments on commit 4235da1

Please sign in to comment.