Git Product home page Git Product logo

Comments (6)

ryankenney-dev avatar ryankenney-dev commented on August 14, 2024 1

This fixed it for me (note Code vs code):

auto-tag/src/workers/autotag_s3_worker.js

-            if (err.code === 'NoSuchTagSet' && err.statusCode === 404) {
+            if (err.Code === 'NoSuchTagSet') {

from auto-tag.

ryankenney-dev avatar ryankenney-dev commented on August 14, 2024

I'm seeing the same issue. It doesn't seem to fail if the bucket has more than zero tags already. Here's a related discussion that suggests S3 needs special handling of an empty tagset: boto/boto3#341

from auto-tag.

ryankenney-dev avatar ryankenney-dev commented on August 14, 2024

Hrm...

Here's the exception I'm seeing:

2023-10-26T18:32:21.938Z	...	ERROR	Invoke Error 	
{
    "errorType": "NoSuchTagSet",
    "errorMessage": "The TagSet does not exist",
    "name": "NoSuchTagSet",
    "$fault": "client",
    "$metadata": {
        "httpStatusCode": 404,
        "extendedRequestId": "...",
        "attempts": 1,
        "totalRetryDelay": 0
    },
    "Code": "NoSuchTagSet",
    "BucketName": "...",
    "RequestId": "...",
    "HostId": "...",
    "message": "The TagSet does not exist",
    "stack": [
        "NoSuchTagSet: The TagSet does not exist",
        "    at throwDefaultError (/var/runtime/node_modules/@aws-sdk/smithy-client/dist-cjs/default-error-handler.js:8:22)",
        "    at deserializeAws_restXmlGetBucketTaggingCommandError (/var/runtime/node_modules/@aws-sdk/client-s3/dist-cjs/protocols/Aws_restXml.js:4180:43)",
        "    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)",
        "    at async /var/runtime/node_modules/@aws-sdk/middleware-serde/dist-cjs/deserializerMiddleware.js:7:24",
        "    at async /var/runtime/node_modules/@aws-sdk/middleware-signing/dist-cjs/middleware.js:13:20",
        "    at async StandardRetryStrategy.retry (/var/runtime/node_modules/@aws-sdk/middleware-retry/dist-cjs/StandardRetryStrategy.js:51:46)",
        "    at async /var/runtime/node_modules/@aws-sdk/middleware-logger/dist-cjs/loggerMiddleware.js:6:22"
    ]
}

I'm running code built from the latest master, where I see special handling code that I would expect to handle the above:

// src/workers/autotag_s3_worker.js

  getExistingTags() {
    return new Promise((resolve, reject) => {
      try {
        this.s3.getBucketTagging({
          Bucket: this.getBucketName(),
        }, (err, res) => {
          if (err) {
            if (err.code === 'NoSuchTagSet' && err.statusCode === 404) {
              resolve([]);
            } else {
              reject(err);
            }
          } else {
            resolve(res.TagSet);
          }
        });
      } catch (e) {
        reject(e);
      }   
    }); 
  }

from auto-tag.

rayjanoka avatar rayjanoka commented on August 14, 2024

thanks everyone, it should be resolved in v0.5.8!

from auto-tag.

casper-gh avatar casper-gh commented on August 14, 2024

@rayjanoka FYI - This issue still exists on v0.5.9. The fix is what @ryankenney-dev suggested.

from auto-tag.

rayjanoka avatar rayjanoka commented on August 14, 2024

@nicholas-yong got it this time. thanks Nicholas! see v0.5.10

from auto-tag.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.