improve comment that explains what removeReqID does and when it fails

Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
This commit is contained in:
Tim Ramlot 2024-02-08 17:20:36 +01:00
parent 06b3cd3372
commit c3b8cbd608
No known key found for this signature in database
GPG Key ID: 47428728E0C2878D

View File

@ -292,7 +292,10 @@ func newTXTRecordSet(fqdn, value string, ttl int) *route53types.ResourceRecordSe
// avoid spurious challenge updates.
//
// The given error must not be nil. This function must be called everywhere
// we have a non-nil error coming from an aws-sdk-go func.
// we have a non-nil error coming from an aws-sdk-go func. The passed error
// is modified in place. This function does not work in case the full error
// message is pre-generated at construction time (instead of when Error() is
// called), which is the case for eg. fmt.Errorf("error message: %w", err).
func removeReqID(err error) error {
var responseError *awshttp.ResponseError
if errors.As(err, &responseError) {