Improve error logging for better debugging in gateway logs#13951
Open
arpankanwer wants to merge 5 commits intoopenclaw:mainfrom
Open
Improve error logging for better debugging in gateway logs#13951arpankanwer wants to merge 5 commits intoopenclaw:mainfrom
arpankanwer wants to merge 5 commits intoopenclaw:mainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Improves observability for Pi Embedded Runner provider failures by adding structured error logs so gateway logs retain more context when provider calls fail.
Changes:
- Add immediate logging for suspected provider HTTP errors during prompt submission in
runEmbeddedAttempt. - Add fallback logging for non-failover provider errors in
runEmbeddedPiAgentbefore rethrowing to the caller.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/agents/pi-embedded-runner/run/attempt.ts |
Logs provider HTTP errors (status ≥ 400) at the prompt submission source with run/session/provider/model context. |
src/agents/pi-embedded-runner/run.ts |
Logs non-failover provider errors before propagating them to the user. |
TWFBusiness
added a commit
to TWFBusiness/openclaw-tw
that referenced
this pull request
Feb 11, 2026
- openclaw#14019: prevent cron jobs from skipping execution (nextRunAtMs regression) - openclaw#13931: drain active agent turns before gateway restart - openclaw#14023: filter skills watcher file types to prevent FD exhaustion - openclaw#13983: use requested agentId for isolated cron job auth resolution - openclaw#13956: fix Grok web search returning empty content (xAI Responses API) - openclaw#14018: auto-remind AI to check workspace context files on session reset - openclaw#13960: preserve structured config validation errors in UI - openclaw#13951: improve provider error logging in gateway logs - openclaw#14021: optional memory flush before manual /compact command Co-Authored-By: Claude Opus 4.6 <[email protected]>
bfc1ccb to
f92900f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #13868
This pull request improves error logging for provider errors in the Pi Embedded Runner to ensure better visibility and debugging of issues in the gateway logs. The changes focus on capturing both general provider errors and specific HTTP errors with detailed context.
Enhanced error logging:
run.tsto ensure they are captured in gateway logs before being propagated to the user. The log includes provider, model, session key, and a truncated error message.run/attempt.tswhen an error with HTTP status 400 or above is detected. The log records provider, model, session ID, run ID, HTTP status, error message, and error type for improved debugging.Greptile Overview
Greptile Summary
Added comprehensive error logging to capture provider errors that weren't being logged before, improving visibility into gateway issues.
run.tsbefore throwing, capturing provider, model, session key, and truncated error textattempt.tsat the source, including provider, model, session/run IDs, HTTP status, error message, and error typeConfidence Score: 5/5
(2/5) Greptile learns from your feedback when you react with thumbs up/down!