-
Notifications
You must be signed in to change notification settings - Fork 85
Open
Description
Hidden variables or definite ones? Or better ideas?
# Option 1
get "path", fn conn, _params ->
json(conn, %{hello: :hehe})
end
# Option 2
get "path" do
json(conn, %{hello: :hehe})
end
# Option 1
rescue_from Unauthorized, fn conn, _params, error ->
conn
|> put_status(400)
|> json(%{error: :unauthorized, error})
end
rescue_from :all, &rescue_all_errors/3
# Option 2
rescue_from Unauthorized, as: error do
conn
|> put_status(400)
|> json(%{error: :unauthorized, error})
end
rescue_from :all, with: :rescue_all_errors
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels