fix: reworking some code smell issues

This commit is contained in:
2026-06-26 16:34:07 +02:00
parent 68de265137
commit d1acfd4d71
42 changed files with 661 additions and 129 deletions

View File

@@ -108,7 +108,10 @@ defmodule BDS.Embeddings.Backends.Neural do
{:reply, error, state}
end
rescue
exception ->
# Only genuine Nx/serving runtime errors become {:error, _}. Programmer bugs
# (MatchError, FunctionClauseError, …) are not caught here so they crash the
# supervised GenServer and surface unmodified instead of being repackaged.
exception in [ArgumentError, RuntimeError] ->
{:reply, {:error, Exception.message(exception)}, state}
end