fix(bitbucket): handle API errors in workspace listing and guard empty pipeline Id#8885
Merged
klesh merged 1 commit intoMay 30, 2026
Conversation
…y pipelineId - Add HTTP status code check in listBitbucketWorkspaces, mirroring the existing check in listBitbucketRepos. A non-2xx Bitbucket response was silently unmarshalled as an empty WorkspaceResponse, causing the UI to show No data to select with no error surfaced to the user. - Guard against calling the pipeline subtasks API with an empty pipelineId in card.tsx and step-4.tsx. The record is initialised with pipelineId="" in step-2 before a pipeline has been triggered, causing the frontend to issue GET /pipelines//subtasks and receive a 400 invalid pipeline ID format error from the backend. Fixes apache#8868
klesh
approved these changes
May 30, 2026
Contributor
klesh
left a comment
There was a problem hiding this comment.
LGTM.
Thanks for your contribution.
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.
Add HTTP status code check in listBitbucketWorkspaces, mirroring the existing check in listBitbucketRepos. A non-2xx Bitbucket response was silently unmarshalled as an empty WorkspaceResponse, causing the UI to show No data to select with no error surfaced to the user.
Guard against calling the pipeline subtasks API with an empty pipelineId in card.tsx and step-4.tsx. The record is initialised with pipelineId="" in step-2 before a pipeline has been triggered, causing the frontend to issue GET /pipelines//subtasks and receive a 400 invalid pipeline ID format error from the backend.
pr-type/bug-fix,pr-type/feature-development, etc.Summary
What does this PR do?
Backend (
backend/plugins/bitbucket/api/remote_api.go):listBitbucketWorkspacesdid not check the HTTP status code before unmarshalling, unlike siblinglistBitbucketRepos. When Bitbucket returns a non-2xx error,json.Unmarshalsilently produces a zero-valueWorkspaceResponse(emptyvalues), so the endpoint returned HTTP 200 withchildren: []causing "No data to select" in the UI with no visible error.Frontend (
card.tsx,step-4.tsx): After a Bitbucket connection is created in Step 2, the record is stored withpipelineId: "". Both the onboard card and Step 4 calledAPI.pipeline.subTasks(record.pipelineId)without checking ifpipelineIdwas non-empty, sendingGET /pipelines//subtasksto the backend and producing the logged400 invalid pipeline ID formaterror.Does this close any open issues?
Closes 8868