Skip to content

Commit 9152483

Browse files
committed
chore: null check if user sends manually sends id in the config
1 parent 2686227 commit 9152483

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/handlers/handlerUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -893,7 +893,7 @@ export async function tryTargetsRecursively(
893893
method
894894
);
895895
if (isHandlingCircuitBreaker) {
896-
await c.get('handleCircuitBreakerResponse')(
896+
await c.get('handleCircuitBreakerResponse')?.(
897897
response,
898898
currentInheritedConfig.id,
899899
currentTarget.cbConfig,
@@ -927,7 +927,7 @@ export async function tryTargetsRecursively(
927927
} else {
928928
response = error.response;
929929
if (isHandlingCircuitBreaker) {
930-
await c.get('recordCircuitBreakerFailure')(
930+
await c.get('recordCircuitBreakerFailure')?.(
931931
env(c),
932932
currentInheritedConfig.id,
933933
currentTarget.cbConfig,

0 commit comments

Comments
 (0)