File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -96,7 +96,14 @@ export async function assertTopic(
9696 } catch ( error ) {
9797 if ( ! isError ( error ) ) throw error
9898 // To build ARN we need topic name and error should be "topic already exist with different tags"
99- if ( ! topicOptions . Name || ! isTopicAlreadyExistWithDifferentTagsError ( error ) ) throw error
99+ if ( ! topicOptions . Name || ! isTopicAlreadyExistWithDifferentTagsError ( error ) ) {
100+ throw new InternalError ( {
101+ message : `${ topicOptions . Name } - ${ error . message } ` ,
102+ cause : error ,
103+ details : { topicName : topicOptions . Name } ,
104+ errorCode : 'SNS_CREATE_TOPIC_COMMAND_UNEXPECTED_ERROR' ,
105+ } )
106+ }
100107
101108 topicArn = await buildTopicArn ( stsClient , topicOptions . Name )
102109 if ( ! extraParams ?. forceTagUpdate ) {
@@ -106,6 +113,7 @@ export async function assertTopic(
106113 throw new InternalError ( {
107114 message : `${ topicOptions . Name } - ${ error . message } ` ,
108115 details : {
116+ topicName : topicOptions . Name ,
109117 currentTags : JSON . stringify ( currentTags ) ,
110118 newTags : JSON . stringify ( topicOptions . Tags ) ,
111119 } ,
Original file line number Diff line number Diff line change 11{
22 "name" : " @message-queue-toolkit/sns" ,
3- "version" : " 21.1.1 " ,
3+ "version" : " 21.1.2 " ,
44 "private" : false ,
55 "license" : " MIT" ,
66 "description" : " SNS adapter for message-queue-toolkit" ,
You can’t perform that action at this time.
0 commit comments