Skip to content

Instantly share code, notes, and snippets.

@karlosmid
Created August 14, 2021 14:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save karlosmid/d8bd97107c2e4849b1b90556d97589dc to your computer and use it in GitHub Desktop.
Save karlosmid/d8bd97107c2e4849b1b90556d97589dc to your computer and use it in GitHub Desktop.
Handle the broken HTTP request
defmodule YourAppName.LogIncompleteRequestHandler do
require Logger
def handle_event([:cowboy, :request, :early_error], _response, request, nil) do
Logger.error(IO.inspect(request))
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment