Skip to content

Commit

Permalink
Improve error message when returning non-conn (elixir-plug#756)
Browse files Browse the repository at this point in the history
  • Loading branch information
princemaple authored and josevalim committed Aug 28, 2018
1 parent 1a4233f commit c528f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/plug/builder.ex
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,8 @@ defmodule Plug.Builder do
%Plug.Conn{} = conn ->
unquote(acc)

_ ->
raise unquote(error_message)
other ->
raise unquote(error_message) <> ", got: #{inspect(other)}"
end
end

Expand Down

0 comments on commit c528f3f

Please sign in to comment.