Prevent empty deadLetterQueue TargetArns#248
Prevent empty deadLetterQueue TargetArns#248jync wants to merge 2 commits intomotdotla:mastermotdotla/node-lambda:masterfrom
Conversation
* Command returns options as an empty string. Empty strings are invalid ARNs anyway and the AWS SDK will fail. Ignore empty strings if they are sent through.
|
Thanks. For the above reasons there is a background that we accepted the empty string. |
* Again, the AWS SDK fails if it is provided and not expected
| @@ -0,0 +1 @@ | ||
| undefined No newline at end of file |
| @@ -0,0 +1 @@ | ||
| undefined No newline at end of file |
| @@ -0,0 +1 @@ | ||
| undefined No newline at end of file |
| @@ -0,0 +1 @@ | ||
| undefined No newline at end of file |
| } | ||
| } | ||
| if (program.deadLetterConfigTargetArn !== undefined) { | ||
| if (program.deadLetterConfigTargetArn !== undefined && program.deadLetterConfigTargetArn !== '' && program.deadLetterConfigTargetArn !== null) { |
There was a problem hiding this comment.
as @abetomo already mentioned, we allowed '' to be passed, to have a possibility to unset it. We would need some kind of mechanism for understanding if this is an update or a create, and adjust accordingly.
| if (program.tracingConfig !== undefined && program.tracingConfig !== '' && program.tracingConfig !== null) { | ||
| params.TracingConfig.Mode = program.tracingConfig; | ||
| } else { | ||
| delete params.TracingConfig; |
There was a problem hiding this comment.
does this return an error if it's null? (seems counter-intuitive to the other params we're sending, but then again AWS API's are not known to be intuitive)
|
Closing for now as two weeks have passed without activity. |
Commander can return an option as an empty string. Empty strings are invalid ARNs and the AWS SDK will fail. Ignore empty strings if they are sent through.