Skip to content

Commit

Permalink
Add generic error logger handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Rados13 committed May 10, 2024
1 parent 16e09f8 commit 6a78df6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/jellyfish_web/controllers/fallback_controller.ex
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
defmodule JellyfishWeb.FallbackController do
use JellyfishWeb, :controller

require Logger

def call(conn, {:error, status, reason}) do
# TODO FIXME
Logger.warning("Generic error handler status: #{status}, reason: #{reason}")

conn
|> put_resp_content_type("application/json")
|> put_status(status)
Expand Down

0 comments on commit 6a78df6

Please sign in to comment.