ubiquity-os-marketplace / command-start-stop

Manager user commands to assign / un-assign themselves to tasks.
0 stars 18 forks source link

Handle 403 error on user assign #72

Open gentlementlegen opened 2 weeks ago

gentlementlegen commented 2 weeks ago
              <samp>
<table>
<tr>
<td>Deadline</td>
<td>Sun, Oct 27, 11:31 AM UTC</td>
</tr>
<tr>
<td>Beneficiary</td>
<td>0x3EFFe91C62d1864C3B791Bc7bbD43b68B899d12A</td>
</tr>
</table>
</samp>

> [!TIP]
> - Use <code>/wallet 0x0000...0000</code> if you want to update your registered payment wallet address.
> - Be sure to open a draft pull request as soon as possible to communicate updates on your progress.
> - Be sure to provide timely updates to us when requested, or you will be automatically unassigned from the task.
<!-- Ubiquity - Assignment - start - 2098c06
{
  "taskDeadline": "Sun, Oct 27, 11:31 AM UTC",
  "taskAssignees": [
    87988127
  ],
  "priceLabel": {
    "id": null,
    "name": "Price: 25 USD",
    "description": null,
    "node_id": "LA_kwDOLUK0B88AAAABkZJBnQ",
    "default": true
  },
  "revision": "2098c06",
  "caller": "start"
}
-->

Originally posted by @ubiquity-os-beta[bot] in https://github.com/ubiquity-os-marketplace/text-conversation-rewards/issues/77#issuecomment-2439958186

The bot properly posted the comment but doesn't seem to assign the user correctly. The relevant error is:

   ⚠ {
        "err": {
          "name": "HttpError",
          "status": 403,
          "response": {
            "url": "https://api.github.com/orgs/ubiquity-os-marketplace/memberships/FibrinLab",
            "status": 403,
            "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",
              "cf-cache-status": "DYNAMIC",
              "cf-ray": "8d9203b8f2817f9a-IAD",
              "connection": "keep-alive",
              "content-security-policy": "default-src 'none'",
              "content-type": "application/json; charset=utf-8",
              "date": "Sun, 27 Oct 2024 10:31:06 GMT",
              "referrer-policy": "origin-when-cross-origin, strict-origin-when-cross-origin",
              "server": "cloudflare",
              "strict-transport-security": "max-age=31536000; includeSubdomains; preload",
              "transfer-encoding": "chunked",
              "vary": "Accept-Encoding, Accept, X-Requested-With",
              "x-accepted-github-permissions": "members=read",
              "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": "E142:7ED10:35E05ED:6708E73:671E166A",
              "x-ratelimit-limit": "5000",
              "x-ratelimit-remaining": "4989",
              "x-ratelimit-reset": "1730028664",
              "x-ratelimit-resource": "core",
              "x-ratelimit-used": "11",
              "x-xss-protection": "0"
            },
            "data": {
              "message": "Resource not accessible by integration",
              "documentation_url": "https://docs.github.com/rest/orgs/members#get-organization-membership-for-a-user",
              "status": "403"
            }
          },
          "request": {
            "method": "GET",
            "url": "https://api.github.com/orgs/ubiquity-os-marketplace/memberships/FibrinLab",
            "headers": {
              "accept": "application/vnd.github.v3+json",
              "user-agent": "octokit-rest.js/20.1.1 octokit-core.js/5.2.0 Cloudflare-Workers",
              "authorization": "token [REDACTED]"
            },
            "request": {}
          }
        },
        "caller": "getUserRoleAndTaskLimit"
      }

and message  ⚠ Could not get user role