support automatic api key auth with key in query param#64
Conversation
|
Preview deployed!
This preview shares the staging database and will be cleaned up when the PR is merged or closed. Run E2E testsnpm run e2e -- https://pr64-api.relaycast.dev --ciOpen observer dashboard |
| (inbox.recentReactions?.length ?? 0) > 0; | ||
|
|
||
| console.debug('[piggyback] inbox fetch ok — channels=%d mentions=%d dms=%d reactions=%d', | ||
| console.error('[piggyback] inbox fetch ok — channels=%d mentions=%d dms=%d reactions=%d', |
There was a problem hiding this comment.
🟡 Successful inbox fetch logged at console.error instead of console.debug
The success-path log message [piggyback] inbox fetch ok was changed from console.debug to console.error. Every successful tool invocation that piggybacks inbox data will now emit an error-level log line, polluting error monitoring and alerting systems.
Root Cause
At packages/mcp/src/piggyback.ts:113, the log level was changed from console.debug to console.error for the success case:
console.error('[piggyback] inbox fetch ok — channels=%d mentions=%d dms=%d reactions=%d', ...);This is a normal operational message ("inbox fetch ok") that should remain at debug level. The failure case on line 131 being console.error is appropriate, but the success case should not be.
Impact: Every successful MCP tool call that piggybacks inbox data will generate a spurious error log. In production, this will trigger false alerts and make it harder to find real errors in log aggregation tools.
| console.error('[piggyback] inbox fetch ok — channels=%d mentions=%d dms=%d reactions=%d', | |
| console.debug('[piggyback] inbox fetch ok — channels=%d mentions=%d dms=%d reactions=%d', |
Was this helpful? React with 👍 or 👎 to provide feedback.
Allows https://observer.relaycast.dev/?key=rk_live_599b9a48a50cfb51bdacfa38fef9f2d6 to work for a user to view the observer dashboard easily