Skip to content

fix(microbot): error telemetry follow-ups from release review - #1902

Open
chsami wants to merge 1 commit into
developmentfrom
claude/error-telemetry-followups
Open

chsami wants to merge 1 commit into
developmentfrom
claude/error-telemetry-followups

Conversation

@chsami

@chsami chsami commented Oct 7, 2026

Copy link
Copy Markdown
Owner

Summary

Two minor fixes from CodeRabbit's review of the 2.6.30 release PR (#1901):

  • If submitErrors throws while building the request (for example, a malformed -Dmicrobot.apiUrl), the drained batch was lost. It is now re-queued before the exception is rethrown.
  • MicrobotApi.submitErrors closes the HTTP response before running the rejection callback, so a callback that throws cannot leak the response.

Neither case occurs with the default configuration.

Test plan

  • ScriptErrorReporterTest 11/11, including the new requeuesBatchWhenSubmitThrows

🤖 Generated with Claude Code

… first

CodeRabbit on #1901: if building the upload request throws synchronously
(e.g. a malformed -Dmicrobot.apiUrl) the drained batch was lost; requeue
it before rethrowing. Close the HTTP response before running the
rejection callback so a throwing callback cannot leak it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PKz6YjDRJdva762xPzTaia
@coderabbitai

coderabbitai Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9b15b2fe-b290-45d9-b2ac-6887a13129a7
📥 Commits

Reviewing files that changed from the base of the PR and between 81bc7fb and b5e3efc.

📒 Files selected for processing (3)
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/MicrobotApi.java
  • runelite-client/src/main/java/net/runelite/client/plugins/microbot/diagnostics/ScriptErrorReporter.java
  • runelite-client/src/test/java/net/runelite/client/plugins/microbot/diagnostics/ScriptErrorReporterTest.java

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 0 remain after this review.


Walkthrough

The change closes the HTTP response after saving its success status and code, then checks the status and handles unsuccessful responses. ScriptErrorReporter.send() now requeues submitted errors when submitErrors() throws a RuntimeException, then rethrows the exception. A test verifies that flush() leaves the error pending after an IllegalArgumentException.

Priority: ⬇️ Low

Merge Risk: ⚪ Minimal · up to b5e3e

The updated paths close HTTP responses before rejection handling and preserve telemetry errors after synchronous submission failures. No specific merge blocker was identified.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 7 functions across 3 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies two Microbot error telemetry fixes made after release review.
Description check ✅ Passed The description accurately explains both changes and includes the test result for the affected reporter.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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