Skip to content

Commit

Permalink
handler error: log request
Browse files Browse the repository at this point in the history
  • Loading branch information
fonsp authored Mar 27, 2024
1 parent eb1d2a9 commit 28ed65b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Servers.jl
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@ function handle_connection(f, c::Connection, listener, readtimeout, access_log)
Base.invokelatest(f, http)
# If `startwrite()` was never called, throw an error so we send a 500 and log this
if isopen(http) && !iswritable(http)
error("Server never wrote a response")
error("Server never wrote a response.\n\n$request")
end
@debugv 1 "closeread"
closeread(http)
Expand All @@ -483,7 +483,7 @@ function handle_connection(f, c::Connection, listener, readtimeout, access_log)
@logmsgv 1 level begin
msg = current_exceptions_to_string()
"handle_connection handler error. $msg"
end
end request

if isopen(http) && !iswritable(http)
request.response.status = 500
Expand Down

0 comments on commit 28ed65b

Please sign in to comment.