{ ERR_NO_SUCH_BUCKET, {404, "NoSuchBucket" }},
{ ERR_NO_SUCH_WEBSITE_CONFIGURATION, {404, "NoSuchWebsiteConfiguration" }},
{ ERR_NO_SUCH_UPLOAD, {404, "NoSuchUpload" }},
- { ERR_NOT_FOUND, {404, "Not Found"}},
+ { ERR_NOT_FOUND, {404, "NotFound"}},
{ ERR_NO_SUCH_LC, {404, "NoSuchLifecycleConfiguration"}},
{ ERR_NO_SUCH_BUCKET_POLICY, {404, "NoSuchBucketPolicy"}},
{ ERR_NO_SUCH_USER, {404, "NoSuchUser"}},
ret = ps.get_topic(this, topic_name, result, y, nullptr);
if (ret < 0) {
ldpp_dout(this, 4) << "failed to get topic '" << topic_name << "', ret=" << ret << dendl;
+ if (ret == -ENOENT) {
+ s->err.message = "No such TopicArn";
+ return -ERR_NOT_FOUND; // return NotFound instead of NoSuchKey
+ }
return ret;
}
if (topic_has_endpoint_secret(result) && !verify_transport_security(s->cct, *(s->info.env))) {
ret = ps.get_topic(this, topic_name, result, y, nullptr);
if (ret < 0) {
ldpp_dout(this, 4) << "failed to get topic '" << topic_name << "', ret=" << ret << dendl;
+ if (ret == -ENOENT) {
+ s->err.message = "No such TopicArn";
+ return -ERR_NOT_FOUND; // return NotFound instead of NoSuchKey
+ }
return ret;
}
if (topic_has_endpoint_secret(result) && !verify_transport_security(s->cct, *(s->info.env))) {
if (ret < 0) {
ldpp_dout(this, 4) << "failed to get topic '" << topic_name
<< "', ret=" << ret << dendl;
+ if (ret == -ENOENT) {
+ s->err.message = "No such TopicArn";
+ return -ERR_NOT_FOUND; // return NotFound instead of NoSuchKey
+ }
return ret;
}
topic_owner = result.owner;