Showing the changes to apps/server/src/sourceControl/SourceControlRepositoryService.ts (1 of 86 files). Show all
Unified · Split
| @@ -22,6 +22,7 @@ import { · 21 unmodified lines | ||
| 22 | 22 | import { ServerConfig } from "../config.ts"; |
| 23 | 23 | import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; |
| 24 | 24 | import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts"; |
| 25 | +const isSourceControlRepositoryError = Schema.is(SourceControlRepositoryError); | |
| 25 | 26 | |
| 26 | 27 | export interface SourceControlRepositoryServiceShape { |
| 27 | 28 | readonly lookupRepository: ( |
| @@ -69,7 +70,7 @@ function repositoryError(input: { · 41 unmodified lines | ||
| 69 | 70 | |
| 70 | 71 | function mapRepositoryError(operation: string, provider: SourceControlProviderKind) { |
| 71 | 72 | return Effect.mapError((cause: unknown) => |
| 72 | − Schema.is(SourceControlRepositoryError)(cause) | |
| 73 | + isSourceControlRepositoryError(cause) | |
| 73 | 74 | ? cause |
| 74 | 75 | : repositoryError({ |
| 75 | 76 | operation, |