Skip to content

Commit

Permalink
fix(error_json): Use Application.get_env() instead of Mix.env()
Browse files Browse the repository at this point in the history
  • Loading branch information
crod951 committed Jan 10, 2025
1 parent 36721d3 commit 9a4519f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/epochtalk_server_web/json/error_json.ex
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ defmodule EpochtalkServerWeb.Controllers.ErrorJSON do
defp format_error(status, message) when is_integer(status) and is_binary(message) do
%{
status: status,
message: if(Mix.env() == :prod, do: "Something went wrong", else: message),
message: if(Application.get_env(:epochtalk_server, :env) == :dev, do: "Something went wrong", else: message),
error: Phoenix.Controller.status_message_from_template(to_string(status))
}
end
Expand Down

0 comments on commit 9a4519f

Please sign in to comment.