More visible errors for parse errors (fixes philomena-dev/philomena#149)

This commit is contained in:
byte[] 2021-12-12 12:39:23 -05:00
parent 9bb2ed3666
commit 4bb2e3078c
2 changed files with 5 additions and 5 deletions

View file

@ -3,8 +3,8 @@
= render PhilomenaWeb.ImageView, "index.html", conn: @conn, tags: @tags, images: @images, header: "Searching for #{@conn.params["q"]}", route: fn p -> Routes.search_path(@conn, :index, p) end, scope: scope(@conn)
- assigns[:error] ->
p
' Oops, there was an error evaluating your query:
.block.block--fixed.block--danger
' Oops, there was an error parsing your query! Check for mistakes like mismatched parentheses. The error was:
pre = assigns[:error]
- blank?(@conn.params["q"]) ->
@ -14,4 +14,4 @@
p
' No images found!
= render PhilomenaWeb.SearchView, "_form.html", conn: @conn
= render PhilomenaWeb.SearchView, "_form.html", conn: @conn

View file

@ -28,8 +28,8 @@ h2 Search Results
= render PhilomenaWeb.PaginationView, "_pagination_info.html", page: @tags
- assigns[:error] ->
p
' Oops, there was an error evaluating your query:
.block.block--fixed.block--danger
' Oops, there was an error parsing your query! Check for mistakes like mismatched parentheses. The error was:
pre = assigns[:error]
- true ->