refactor: add tests and ci gates for quality

This commit is contained in:
guarzo
2025-06-27 13:50:54 -04:00
parent 472dbaa68b
commit d390455cf2
136 changed files with 19659 additions and 1233 deletions

View File

@@ -5,7 +5,12 @@ defmodule WandererAppWeb.FallbackController do
# Handles not_found errors from with/else
def call(conn, {:error, :not_found}) do
APIUtils.error_response(conn, :not_found, "Not found", "The requested resource could not be found")
APIUtils.error_response(
conn,
:not_found,
"Not found",
"The requested resource could not be found"
)
end
# Handles invalid_id errors
@@ -15,7 +20,11 @@ defmodule WandererAppWeb.FallbackController do
# Handles invalid_coordinates_format errors
def call(conn, {:error, :invalid_coordinates_format}) do
APIUtils.error_response(conn, :bad_request, "Invalid coordinates format. Use %{\"coordinates\" => %{\"x\" => number, \"y\" => number}}")
APIUtils.error_response(
conn,
:bad_request,
"Invalid coordinates format. Use %{\"coordinates\" => %{\"x\" => number, \"y\" => number}}"
)
end
# Handles not_associated errors