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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Bake Sourcebot version into code rather than relying on build arg. [#680](https://github.com/sourcebot-dev/sourcebot/pull/680)
- Fix issue with `/repos` page pagination. [#689](https://github.com/sourcebot-dev/sourcebot/pull/689)
- Add better logs for gitlab config sync fails. [#692](https://github.com/sourcebot-dev/sourcebot/pull/692)

## [4.10.4] - 2025-12-18

Expand Down
31 changes: 18 additions & 13 deletions packages/backend/src/gitlab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,16 @@ export const getGitLabReposFromConfig = async (config: GitlabConnectionConfig) =
logger.error(`Failed to fetch projects for group ${group}.`, e);

const status = e?.cause?.response?.status;
if (status === 404) {
const warning = `Group ${group} not found or no access`;
logger.warn(warning);
if (status !== undefined) {
const warning = `GitLab API returned ${status}`
logger.warning(warning);
return {
type: 'warning' as const,
warning
};
}
}

logger.error("No API response status returned");
throw e;
}
}));
Expand Down Expand Up @@ -135,14 +137,16 @@ export const getGitLabReposFromConfig = async (config: GitlabConnectionConfig) =
logger.error(`Failed to fetch projects for user ${user}.`, e);

const status = e?.cause?.response?.status;
if (status === 404) {
const warning = `User ${user} not found or no access`;
logger.warn(warning);
if (status !== undefined) {
const warning = `GitLab API returned ${status}`
logger.warning(warning);
return {
type: 'warning' as const,
warning
};
}
}

logger.error("No API response status returned");
throw e;
}
}));
Expand Down Expand Up @@ -171,15 +175,16 @@ export const getGitLabReposFromConfig = async (config: GitlabConnectionConfig) =
logger.error(`Failed to fetch project ${project}.`, e);

const status = e?.cause?.response?.status;

if (status === 404) {
const warning = `Project ${project} not found or no access`;
logger.warn(warning);
if (status !== undefined) {
const warning = `GitLab API returned ${status}`
logger.warning(warning);
return {
type: 'warning' as const,
warning
};
}
}

logger.error("No API response status returned");
throw e;
}
}));
Expand Down