Skip to content

Commit 5c17a3f

Browse files
author
Steven Yuan
authored
fix(middleware-endpoint-discovery): assert clientName and commandName in context (#5232)
1 parent 3a72385 commit 5c17a3f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/middleware-endpoint-discovery/src/endpointDiscoveryMiddleware.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ export const endpointDiscoveryMiddleware =
2828

2929
const { endpointDiscoveryCommandCtor } = config;
3030
const { isDiscoveredEndpointRequired, identifiers } = middlewareConfig;
31-
const { clientName, commandName } = context;
31+
const clientName = context.clientName!;
32+
const commandName = context.commandName!;
3233
const isEndpointDiscoveryEnabled = await config.endpointDiscoveryEnabled();
3334
const cacheKey = await getCacheKey(commandName, config, { identifiers });
3435

0 commit comments

Comments
 (0)