Skip to content

Commit a7cb2e8

Browse files
committed
style(bitbucket): use catchTags for timeout errors
1 parent b847f4d commit a7cb2e8

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

‎apps/server/src/sourceControl/BitbucketApi.ts‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -723,9 +723,9 @@ export const make = Effect.gen(function* () {
723723
),
724724
Effect.flatMap((response) => decodeResponse(operation, schema, response)),
725725
Effect.timeout(BITBUCKET_API_REQUEST_TIMEOUT),
726-
Effect.catchTag("TimeoutError", (cause) =>
727-
Effect.fail(new BitbucketRequestError({ operation, cause })),
728-
),
726+
Effect.catchTags({
727+
TimeoutError: (cause) => Effect.fail(new BitbucketRequestError({ operation, cause })),
728+
}),
729729
);
730730

731731
const resolveRepository = Effect.fn("BitbucketApi.resolveRepository")(function* (input: {
@@ -965,9 +965,10 @@ export const make = Effect.gen(function* () {
965965
),
966966
// Cap redirects plus final body consumption, not just response headers.
967967
Effect.timeout(BITBUCKET_API_REQUEST_TIMEOUT),
968-
Effect.catchTag("TimeoutError", (cause) =>
969-
Effect.fail(new BitbucketRequestError({ operation: "request", cause })),
970-
),
968+
Effect.catchTags({
969+
TimeoutError: (cause) =>
970+
Effect.fail(new BitbucketRequestError({ operation: "request", cause })),
971+
}),
971972
);
972973

973974
return BitbucketApi.of({

0 commit comments

Comments
 (0)