Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions backend/plugins/bitbucket/api/remote_api.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ func listBitbucketWorkspaces(
if err != nil {
return
}
if res.StatusCode > 299 {
body, e := io.ReadAll(res.Body)
if e != nil {
err = errors.BadInput.Wrap(e, "failed to read response body")
return
}
err = errors.HttpStatus(res.StatusCode).New(string(body))
return
}

resBody := &models.WorkspaceResponse{}
err = api.UnmarshalResponse(res, resBody)
Expand Down
4 changes: 2 additions & 2 deletions config-ui/src/routes/onboard/components/card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ export const OnboardCard = ({ style }: Props) => {

const tasksRes = useAutoRefresh(
async () => {
if ((data && data.done) || !record) {
if ((data && data.done) || !record || !record.pipelineId) {
return;
}

return await API.pipeline.subTasks(record?.pipelineId as string);
return await API.pipeline.subTasks(record.pipelineId as string);
},
[record],
{
Expand Down
5 changes: 4 additions & 1 deletion config-ui/src/routes/onboard/step-4.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,10 @@ export const Step4 = () => {

const { data } = useAutoRefresh(
async () => {
return await API.pipeline.subTasks(record?.pipelineId as string);
if (!record?.pipelineId) {
return;
}
return await API.pipeline.subTasks(record.pipelineId as string);
},
[record],
{
Expand Down
Loading