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 | import { ServerConfig } from "../config.ts"; | 22 | import { ServerConfig } from "../config.ts"; |
| 23 | import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; | 23 | import * as GitVcsDriver from "../vcs/GitVcsDriver.ts"; |
| 24 | import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts"; | 24 | import * as SourceControlProviderRegistry from "./SourceControlProviderRegistry.ts"; |
| 25 | const isSourceControlRepositoryError = Schema.is(SourceControlRepositoryError); | ||
| 25 | 26 | ||
| 26 | export interface SourceControlRepositoryServiceShape { | 27 | export interface SourceControlRepositoryServiceShape { |
| 27 | readonly lookupRepository: ( | 28 | readonly lookupRepository: ( |
| @@ -69,7 +70,7 @@ function repositoryError(input: { · 41 unmodified lines | |||
| 69 | 70 | ||
| 70 | function mapRepositoryError(operation: string, provider: SourceControlProviderKind) { | 71 | function mapRepositoryError(operation: string, provider: SourceControlProviderKind) { |
| 71 | return Effect.mapError((cause: unknown) => | 72 | return Effect.mapError((cause: unknown) => |
| 72 | Schema.is(SourceControlRepositoryError)(cause) | 73 | isSourceControlRepositoryError(cause) |
| 73 | ? cause | 74 | ? cause |
| 74 | : repositoryError({ | 75 | : repositoryError({ |
| 75 | operation, | 76 | operation, |