Skip to content

Commit

Permalink
chore(ecs): incorrect formatting of throw statement in the fromServic…
Browse files Browse the repository at this point in the history
…eArnWithCluster method (aws#30367)

### Issue # (if applicable)

N/A

### Reason for this change
The throw statement uses single quotes instead of backticks, causing incorrect output of ARN during errors.



### Description of changes
Use backticks instead of single quotes for proper formatting.



### Description of how you validated changes



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
mazyu36 authored and Dahlberg Victor committed Jun 10, 2024
1 parent 017ad4a commit 12e9611
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -518,7 +518,7 @@ export abstract class BaseService extends Resource
const arn = stack.splitArn(serviceArn, ArnFormat.SLASH_RESOURCE_NAME);
const resourceName = arn.resourceName;
if (!resourceName) {
throw new Error('Missing resource Name from service ARN: ${serviceArn}');
throw new Error(`Missing resource Name from service ARN: ${serviceArn}`);
}
const resourceNameParts = resourceName.split('/');
if (resourceNameParts.length !== 2) {
Expand Down

0 comments on commit 12e9611

Please sign in to comment.