ubiquity / ubiquibot

Putting the 'A' in 'DAO'
https://github.com/marketplace/ubiquibot
MIT License
16 stars 59 forks source link

Label Already Exists Error in `syncPriceLabelsToConfig()` #912

Open 0x4007 opened 5 months ago

0x4007 commented 5 months ago

Looks like there is another label initalization related issue @wannacfuture

! action has an uncaught error
{
  "handlerType": {
    "type": "pre",
    "actions": [
      null
    ]
  },
  "activeHandler": "syncPriceLabelsToConfig",
  "error": {
    "name": "HttpError",
    "status": 422,
    "response": {
      "url": "https://api.github.com/repos/ubiquity/devpool-directory-ui/labels",
      "status": 422,
      "headers": {
        "access-control-allow-origin": "*",
        "access-control-expose-headers": "ETag, Link, Location, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Used, X-RateLimit-Resource, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval, X-GitHub-Media-Type, X-GitHub-SSO, X-GitHub-Request-Id, Deprecation, Sunset",
        "content-length": "182",
        "content-security-policy": "default-src 'none'",
        "content-type": "application/json; charset=utf-8",
        "date": "Thu, 18 Jan 2024 06:33:13 GMT",
        "referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
        "server": "GitHub.com",
        "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
        "vary": "Accept-Encoding, Accept, X-Requested-With",
        "x-accepted-github-permissions": "issues=write; pull_requests=write",
        "x-content-type-options": "nosniff",
        "x-frame-options": "deny",
        "x-github-api-version-selected": "2022-11-28",
        "x-github-media-type": "github.v3; format=json",
        "x-github-request-id": "AE14:32DE:86A801A:117521E1:65A8C628",
        "x-ratelimit-limit": "6750",
        "x-ratelimit-remaining": "6626",
        "x-ratelimit-reset": "1705562557",
        "x-ratelimit-resource": "core",
        "x-ratelimit-used": "124",
        "x-xss-protection": "0"
      },
      "data": {
        "message": "Validation Failed",
        "errors": [
          {
            "resource": "Label",
            "code": "already_exists",
            "field": "name"
          }
        ],
        "documentation_url": "https://docs.github.com/rest/issues/labels#create-a-label"
      }
    },
    "request": {
      "method": "POST",
      "url": "https://api.github.com/repos/ubiquity/devpool-directory-ui/labels",
      "headers": {
        "accept": "application/vnd.github.v3+json",
        "user-agent": "probot/12.3.3 octokit-core.js/3.6.0 Node.js/20.10.0 (linux; x64)",
        "authorization": "token [REDACTED]",
        "content-type": "application/json; charset=utf-8"
      },
      "body": "{\"name\":\"Priority: 2 (Medium)\",\"color\":\"ededed\"}",
      "request": {
        "retryCount": 1
      }
    }
  },
  "caller": "renderCatchAll",
  "revision": "85177d0"
}

Originally posted by @ubiquibot[bot] in https://github.com/ubiquity/devpool-directory-ui/issues/1#issuecomment-1897884980