[PR #156] [CLOSED] Fix browser tool to not discard content when screenshot fails #199

Closed
opened 2026-06-06 22:09:40 -04:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/vxcontrol/pentagi/pull/156
Author: @04cb
Created: 3/1/2026
Status: Closed

Base: masterHead: fix/browser-tool-screenshot-error-handling


📝 Commits (1)

  • 2a55600 Fix browser tool to not discard content when screenshot fails

📊 Changes

1 file changed (+6 additions, -3 deletions)

View changed files

📝 backend/pkg/tools/browser.go (+6 -3)

📄 Description

Fixes issue #149. The browser tool was discarding successfully-fetched page content when screenshot capture failed. Screenshot is a non-critical side-effect used only for logging, so failures should be logged as warnings without affecting the primary content fetch operation.

Changes:

  • ContentMD: Log screenshot error as warning instead of returning error
  • ContentHTML: Log screenshot error as warning instead of returning error
  • Links: Log screenshot error as warning instead of returning error

All three methods now return valid content with empty screenshot name when screenshot fails, rather than returning an error and discarding the content.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/vxcontrol/pentagi/pull/156 **Author:** [@04cb](https://github.com/04cb) **Created:** 3/1/2026 **Status:** ❌ Closed **Base:** `master` ← **Head:** `fix/browser-tool-screenshot-error-handling` --- ### 📝 Commits (1) - [`2a55600`](https://github.com/vxcontrol/pentagi/commit/2a556005ba8bce777bcba9272601eeb14c89e463) Fix browser tool to not discard content when screenshot fails ### 📊 Changes **1 file changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `backend/pkg/tools/browser.go` (+6 -3) </details> ### 📄 Description Fixes issue #149. The browser tool was discarding successfully-fetched page content when screenshot capture failed. Screenshot is a non-critical side-effect used only for logging, so failures should be logged as warnings without affecting the primary content fetch operation. Changes: - ContentMD: Log screenshot error as warning instead of returning error - ContentHTML: Log screenshot error as warning instead of returning error - Links: Log screenshot error as warning instead of returning error All three methods now return valid content with empty screenshot name when screenshot fails, rather than returning an error and discarding the content. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-06-06 22:09:40 -04:00
yindo closed this issue 2026-06-06 22:09:40 -04:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: vxcontrol/pentagi#199