fix: return error tuples instead of silent {:ok, ""} in execute_macro (CSM-022)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
2be43ca06d
commit
a4ecbabc21
3 files changed
+12
-6
No files matched your search
@@ -3,6 +3,8 @@ defmodule BDS.Scripting do
|
||||
Facade for the configured user-script runtime.
|
||||
"""
|
||||
|
||||
require Logger
|
||||
|
||||
alias BDS.Scripting.Capabilities
|
||||
alias BDS.Scripting.Runtime
|
||||
|
||||
@@ -63,7 +65,9 @@ defmodule BDS.Scripting do
|
||||
) do
|
||||
{:ok, nil} -> {:ok, ""}
|
||||
{:ok, value} -> {:ok, to_string(value)}
|
||||
{:error, _reason} -> {:ok, ""}
|
||||
{:error, reason} ->
|
||||
Logger.warning("execute_macro failed for project #{project_id}: #{inspect(reason)}")
|
||||
{:error, reason}
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user