Skip to content

fix: log error on failed inspector requests#4986

Draft
abcxff wants to merge 1 commit intographite-base/4986from
05-06-fix_log_error_on_failed_inspector_requests
Draft

fix: log error on failed inspector requests#4986
abcxff wants to merge 1 commit intographite-base/4986from
05-06-fix_log_error_on_failed_inspector_requests

Conversation

@abcxff
Copy link
Copy Markdown
Contributor

@abcxff abcxff commented May 6, 2026

Description

Please include a summary of the changes and the related issue. Please also include relevant motivation and context.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

@railway-app
Copy link
Copy Markdown

railway-app Bot commented May 6, 2026

🚅 Deployed to the rivet-pr-4986 environment in rivet-frontend

Service Status Web Updated (UTC)
kitchen-sink ❌ Build Failed (View Logs) Web May 6, 2026 at 10:03 pm
website 😴 Sleeping (View Logs) Web May 6, 2026 at 7:51 pm
frontend-inspector ❌ Build Failed (View Logs) Web May 6, 2026 at 7:43 pm
ladle ❌ Build Failed (View Logs) Web May 6, 2026 at 7:42 pm
frontend-cloud ❌ Build Failed (View Logs) Web May 6, 2026 at 7:41 pm
mcp-hub ✅ Success (View Logs) Web May 6, 2026 at 7:41 pm

Copy link
Copy Markdown
Contributor Author

abcxff commented May 6, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link
Copy Markdown
Contributor

claude Bot commented May 6, 2026

PR Review: fix: log error on failed inspector requests\n\n### Overview\n\nThis PR does two things:\n1. Core fix: Adds errorKey: "error" to pino logger configuration and adds explicit error logging before returning errorResponse(error) in three inspector endpoints in native.ts that previously swallowed errors silently.\n2. Cleanup: Renames the log field key from err to error across multiple files for consistency with the new pino errorKey setting.\n\nThe inspector error logging is a genuine fix. The field renaming is a reasonable consistency sweep.\n\n---\n\n### Issues\n\nBug: Variable shadowing in inline-websocket-adapter.ts\n\nIn #handleError(error: unknown), the inner catch was renamed from catch (handlerErr) to catch (error), shadowing the outer error parameter. Functionally the triggerError calls still reference the outer error (the catch block ends before them), but this will mislead future readers. The original catch (handlerErr) was clearer. Rename to catch (handlerError) to avoid the shadow.\n\nStyle: Uppercase log messages in native.ts\n\nTwo of the three new log messages start with uppercase, violating the CLAUDE.md convention: "Log messages should be lowercase unless mentioning specific code symbols."\n\n- "Error handling inspector action request" should be "error handling inspector action request"\n- "Error handling inspector request" should be "error handling inspector request"\n\nThe third new message ("error replaying workflow history") is already correct.\n\nChanges to deprecated runner paths\n\nengine/sdks/typescript/runner/src/mod.ts and rivetkit-typescript/packages/engine-runner/src/mod.ts are in the deprecated runner path. CLAUDE.md says: "Do not add features to or fix bugs in the deprecated runner path." These are low-risk renames but can be omitted since the files are on the way out.\n\n---\n\n### Minor observations\n\n- The errorKey: "error" pino config change is the right approach — it activates pino's built-in Error serializer (captures message, stack, type) for fields passed under the error key.\n- Several places in actor-driver.ts pass stringifyError(err) (a string) as the error field. This is pre-existing, but now that pino's serializer is wired to that key, passing the raw Error object would let pino extract stack and type automatically.\n- The change at actor-driver.ts:1982 renames the field key to error: err but leaves the variable as err. Consider renaming the variable too for full consistency.\n- PR description is empty and checklist unchecked. A brief summary would help reviewers and future git bisect.\n\n---\n\n### Summary\n\nThe core inspector error logging fix is correct and needed. Before merging: rename the shadowing catch (error) to catch (handlerError) in inline-websocket-adapter.ts, and lowercase the two uppercase log messages in native.ts.

@abcxff abcxff changed the base branch from 05-06-_slop_fix_rivetkit_surface_raw_error_messages_instead_of_generic to graphite-base/4986 May 6, 2026 22:03
@abcxff abcxff force-pushed the graphite-base/4986 branch from e506879 to abb6ff1 Compare May 6, 2026 22:03
@abcxff abcxff force-pushed the 05-06-fix_log_error_on_failed_inspector_requests branch from b150344 to fc4756e Compare May 6, 2026 22:03
@abcxff abcxff changed the base branch from graphite-base/4986 to 05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxy May 6, 2026 22:03
@abcxff abcxff changed the base branch from 05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxy to graphite-base/4986 May 7, 2026 01:26
@abcxff abcxff mentioned this pull request May 7, 2026
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant