Skip to content

Commit

Permalink
Tweak subscription protocol conditional
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurenceWarne committed Oct 14, 2024
1 parent 50b1614 commit 442d8c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-sns/lib/subscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ export class Subscription extends Resource {
}

private renderDeliveryPolicy(deliveryPolicy: DeliveryPolicy, protocol: SubscriptionProtocol): any {
if (protocol !== SubscriptionProtocol.HTTP && protocol !== SubscriptionProtocol.HTTPS) {
if (![SubscriptionProtocol.HTTP, SubscriptionProtocol.HTTPS].includes(protocol)) {
throw new Error(`Delivery policy is only supported for HTTP and HTTPS subscriptions, got: ${protocol}`);
}
const { healthyRetryPolicy, throttlePolicy } = deliveryPolicy;
Expand Down

0 comments on commit 442d8c9

Please sign in to comment.