mirror of
https://github.com/sourcebot-dev/sourcebot.git
synced 2025-12-12 04:15:30 +00:00
Compare commits
2 commits
a164bc983f
...
dfbf66fed2
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dfbf66fed2 | ||
|
|
d63f3cf9d9 |
3 changed files with 11 additions and 8 deletions
|
|
@ -13,6 +13,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Added
|
### Added
|
||||||
- Added support for arbitrary user IDs required for OpenShift. [#658](https://github.com/sourcebot-dev/sourcebot/pull/658)
|
- Added support for arbitrary user IDs required for OpenShift. [#658](https://github.com/sourcebot-dev/sourcebot/pull/658)
|
||||||
|
|
||||||
|
### Updated
|
||||||
|
- Improved error messages in file source api. [#665](https://github.com/sourcebot-dev/sourcebot/pull/665)
|
||||||
|
|
||||||
## [4.10.2] - 2025-12-04
|
## [4.10.2] - 2025-12-04
|
||||||
|
|
||||||
### Fixed
|
### Fixed
|
||||||
|
|
|
||||||
|
|
@ -38,8 +38,8 @@ const auditService = getAuditService();
|
||||||
/**
|
/**
|
||||||
* "Service Error Wrapper".
|
* "Service Error Wrapper".
|
||||||
*
|
*
|
||||||
* Captures any thrown exceptions and converts them to a unexpected
|
* Captures any thrown exceptions, logs them to the console and Sentry,
|
||||||
* service error. Also logs them with Sentry.
|
* and returns a generic unexpected service error.
|
||||||
*/
|
*/
|
||||||
export const sew = async <T>(fn: () => Promise<T>): Promise<T | ServiceError> => {
|
export const sew = async <T>(fn: () => Promise<T>): Promise<T | ServiceError> => {
|
||||||
try {
|
try {
|
||||||
|
|
@ -52,10 +52,6 @@ export const sew = async <T>(fn: () => Promise<T>): Promise<T | ServiceError> =>
|
||||||
return e.serviceError;
|
return e.serviceError;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e instanceof Error) {
|
|
||||||
return unexpectedError(e.message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return unexpectedError(`An unexpected error occurred. Please try again later.`);
|
return unexpectedError(`An unexpected error occurred. Please try again later.`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,8 +22,12 @@ export const CodePreviewPanel = async ({ path, repoName, revisionName }: CodePre
|
||||||
getRepoInfoByName(repoName),
|
getRepoInfoByName(repoName),
|
||||||
]);
|
]);
|
||||||
|
|
||||||
if (isServiceError(fileSourceResponse) || isServiceError(repoInfoResponse)) {
|
if (isServiceError(fileSourceResponse)) {
|
||||||
return <div>Error loading file source</div>
|
return <div>Error loading file source: {fileSourceResponse.message}</div>
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isServiceError(repoInfoResponse)) {
|
||||||
|
return <div>Error loading repo info: {repoInfoResponse.message}</div>
|
||||||
}
|
}
|
||||||
|
|
||||||
const codeHostInfo = getCodeHostInfoForRepo({
|
const codeHostInfo = getCodeHostInfoForRepo({
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue