Skip to content

Commit

Permalink
Handle empty headers when logging a request
Browse files Browse the repository at this point in the history
  • Loading branch information
nid90 committed Dec 26, 2024
1 parent 429d1c6 commit d3732c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rack/rack_ougai_logger.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def create_log(env, status, headers)
path: env[PATH_INFO],
query: env[QUERY_STRING],
status: status.to_i,
duration: headers["X-Runtime"]
duration: headers&.dig("X-Runtime")
}
end
end
Expand Down

0 comments on commit d3732c0

Please sign in to comment.