Hi, need some help figuring out how I can test try-rescue part of the code using AppSignal in Elixir. My AppSignal has configuration for staging and prod but no other environment.
defp test_main_list(post_2) do
main_list = [post_1, post_3]
case post_2 in main_list do
true ->
main_list
false ->
try do
raise "Exception"
rescue
exception ->
Appsignal.set_error(exception, __STACKTRACE__)
final_main_list = [post_1, post_3] ++ [post_2]
end
end