Skip to content

Commit

Permalink
Put back in exception unwrapping
Browse files Browse the repository at this point in the history
  • Loading branch information
quinnj committed Apr 27, 2023
1 parent 9374cdc commit 6fed5e3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/clientlayers/ConnectionRequest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,15 @@ function connectionlayer(handler)
stream = Stream(req.response, io)
return handler(stream; readtimeout=readtimeout, logerrors=logerrors, kw...)
catch e
while true
if e isa CompositeException
e = e.exceptions[1]
elseif e isa TaskFailedException
e = e.task.result
else
break
end
end
if logerrors && !(e isa StatusError || e isa TimeoutError)
@error "HTTP.ConnectionRequest" exception=(e, catch_backtrace()) method=req.method url=req.url context=req.context
end
Expand Down

0 comments on commit 6fed5e3

Please sign in to comment.