Skip to content

chore(moonwell): remove leftover DEBUG console.error calls#1271

Open
memosr wants to merge 1 commit into
coinbase:mainfrom
memosr:fix/moonwell-remove-debug-logs
Open

chore(moonwell): remove leftover DEBUG console.error calls#1271
memosr wants to merge 1 commit into
coinbase:mainfrom
memosr:fix/moonwell-remove-debug-logs

Conversation

@memosr
Copy link
Copy Markdown

@memosr memosr commented Jun 4, 2026

Summary

Removes two leftover console.error("DEBUG - ...") statements from moonwellActionProvider.ts that appear to be debug artifacts.

The issue

In typescript/agentkit/src/action-providers/moonwell/moonwellActionProvider.ts:

Line 172 (inside mint catch block):

} catch (error) {
  console.error("DEBUG - Mint error:", error);
  return `Error minting tokens: ${error}`;
}

Line 268 (inside redeem catch block):

} catch (error) {
  console.error("DEBUG - Redeem error:", error);
  return `Error redeeming tokens: ${error}`;
}

The "DEBUG -" prefix is a strong tell that these are dev-loop leftovers. The errors are already returned to the caller as descriptive strings, so the console.error calls add nothing — they only:

  1. Pollute stdout/stderr in agent runtimes that consume this action provider
  2. Surface raw on-chain error details (which may include sensitive context) that the caller has already chosen how to handle
  3. Add noise to logs in production agent deployments

The fix

Removed both console.error lines. The surrounding catch logic that returns the error string to the caller is untouched.

  } catch (error) {
-   console.error("DEBUG - Mint error:", error);
    return `Error minting tokens: ${error}`;
  }
  } catch (error) {
-   console.error("DEBUG - Redeem error:", error);
    return `Error redeeming tokens: ${error}`;
  }

Verification

  • ✅ Only moonwellActionProvider.ts modified
  • ✅ Both catch blocks still return their error strings to the caller
  • ✅ No behavior change other than no longer writing to stderr

Two console.error("DEBUG - ...") statements were left in the mint and
redeem catch blocks of moonwellActionProvider.ts. The errors are already
returned to the caller as strings, so these were pure debug noise.

Library code that calls console.error pollutes stdout/stderr in agent
runtimes and can surface raw on-chain error details that the caller
already handled. Removed both lines without touching the surrounding
error-return logic.
@memosr memosr requested a review from murrlincoln as a code owner June 4, 2026 12:58
@cb-heimdall
Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions Bot added action provider New action provider typescript labels Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants