Skip to content

Commit 7e6d5e5

Browse files
committed
CLDSRV-224: return only once
1 parent 2667766 commit 7e6d5e5

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

lib/api/bucketGetTagging.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,15 @@ function bucketGetTagging(authInfo, request, log, callback) {
102102
});
103103
monitoring.promMetrics('GET', bucketName, err.code,
104104
'getBucketTagging');
105-
return callback(err, corsHeaders);
105+
} else {
106+
pushMetric('getBucketTagging', log, {
107+
authInfo,
108+
bucket: bucketName,
109+
});
110+
monitoring.promMetrics(
111+
'GET', bucketName, '200', 'getBucketTagging');
106112
}
107-
monitoring.promMetrics(
108-
'GET', bucketName, '200', 'getBucketTagging');
109-
pushMetric('getBucketTagging', log, {
110-
authInfo,
111-
bucket: bucketName,
112-
});
113-
return callback(null, xml, corsHeaders);
113+
return callback(err, xml, corsHeaders);
114114
});
115115
}
116116

0 commit comments

Comments
 (0)