Skip to content

chore(rivetkit): log inspector errors + standardize pino errorKey error#4986

Open
abcxff wants to merge 1 commit into05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxyfrom
05-06-fix_log_error_on_failed_inspector_requests
Open

chore(rivetkit): log inspector errors + standardize pino errorKey error#4986
abcxff wants to merge 1 commit into05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxyfrom
05-06-fix_log_error_on_failed_inspector_requests

Conversation

@abcxff
Copy link
Copy Markdown
Contributor

@abcxff abcxff commented May 6, 2026

Adds error logs to inpector requests + standardizes error errorKey for pino (was being used but not configured in base logger)

@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 7, 2026 at 8:19 pm
website 😴 Sleeping (View Logs) Web May 7, 2026 at 5:48 am
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 force-pushed the 05-06-fix_log_error_on_failed_inspector_requests branch from 1b843f0 to b150344 Compare May 6, 2026 20:28
@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 force-pushed the graphite-base/4986 branch from abb6ff1 to c58ef25 Compare May 7, 2026 20:16
@abcxff abcxff force-pushed the 05-06-fix_log_error_on_failed_inspector_requests branch from fc4756e to 5ec0839 Compare May 7, 2026 20:16
@abcxff abcxff changed the base branch from graphite-base/4986 to 05-06-_slop_fix_rivetkit_remove_async_drizzle_db_proxy May 7, 2026 20:16
@abcxff abcxff changed the title fix: log error on failed inspector requests chore(rivetkit): log inspector errors + standardize pino errorKey error May 7, 2026
@abcxff abcxff marked this pull request as ready for review May 7, 2026 20:21
@abcxff abcxff requested a review from NathanFlurry May 7, 2026 20:23
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