[AutoDevNext] FLOW-2255 atlascode: Error:RovoDevChatProvider.processError - #1880
Open
atlassian[bot] wants to merge 1 commit into
Open
Conversation
…sError - Coerce non-Error thrown values to Error instances in executeStreamingApiWithErrorHandling before passing to processError, so that thrown strings/objects no longer cause processError itself to throw (e.g. accessing .message on undefined). - Guard against undefined _webView in processError: instead of using the non-null assertion operator (!), check for the webview and log a warning then return early if it is not available, preventing the error handler from throwing an unhandled exception. - Add two new unit tests covering: (1) a thrown plain string being handled gracefully with an error dialog shown, and (2) processError not throwing when the webview is unavailable. Resolves: FLOW-2255
atlassian
Bot
requested review from
Blastoplex,
amarg-at,
bwieger-atlassian-com,
cabella-dot,
ccallcottstevens,
cindy-atl,
dchiew-atl,
jwang19-atlassian,
marcomura,
matt-lassian,
mattcolman,
sdzh-atlassian and
teg-atlassian
as code owners
June 19, 2026 03:51
|
Thank you for your submission! Like many open source projects, we ask that you sign our CLA (Contributor License Agreement) before we can accept your contribution. Already signed the CLA? To re-check, try refreshing the page. |
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.
Summary
Fixes an unhandled error in
RovoDevChatProvider.processError(FLOW-2255). The error handler itself was throwing when it encountered non-Error values or when the webview was unavailable.Root Cause
Two issues were identified:
Non-Error thrown values: In
executeStreamingApiWithErrorHandling, thecatchblock passed the caught value directly toprocessError(error: Error, ...)without checking if it was actually anErrorinstance. If a string, number, or plain object was thrown,error.messagewould beundefined, andbuildErrorDetails(error)could throw — causing an unhandled exception from within the error handler itself.Undefined webview:
processErrorused the non-null assertionthis._webView!to get the webview reference. If_webViewwasundefined(e.g., the panel was disposed or not yet set), this would throw a TypeError inside the error handler, making an unhandled exception escape fromprocessError.Changes
src/rovo-dev/rovoDevChatProvider.ts:executeStreamingApiWithErrorHandling: rename caught variable torawErrorand coerce it to anErrorinstance before any further processing.processError: replacethis._webView!with a safe guard — if_webViewisundefined, log a warning viaLogger.warnand return early instead of throwing.src/rovo-dev/rovoDevChatProvider.test.ts:processErrordoes not throw when webview is unavailable.CHANGELOG.md: Added entry under 4.0.31 Bug Fixes.Recent PR change-site overlap
The Bitbucket PR clash check was not applicable — this repository is hosted on GitHub. No clash check was performed.
Notes for Reviewers
executeStreamingApiWithErrorHandlingis minimal: only the catch binding is renamed and a coercion line is added.processErrorguard is defense-in-depth: protecting the error handler from its own failure is critical for reliability.Rovo Dev code review: Rovo Dev couldn't review this pull request
Rovo Dev does not review pull requests created by bot accounts.