Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot crashes with [HttpError]: other side closed #421

Open
skjnldsv opened this issue Feb 20, 2024 · 2 comments
Open

Bot crashes with [HttpError]: other side closed #421

skjnldsv opened this issue Feb 20, 2024 · 2 comments

Comments

@skjnldsv
Copy link
Member

 /app/node_modules/@octokit/request/dist-node/index.js:156
     throw new import_request_error.RequestError(message, 500, {
           ^
 
 RequestError [HttpError]: other side closed
     at /app/node_modules/@octokit/request/dist-node/index.js:156:11
     at addReaction (/app/src/githubUtils.ts:37:2) {
   status: 500,
   request: {
     method: 'POST',
     url: 'https://api.github.com/repos/nextcloud/server/issues/comments/1953680517/reactions',
     headers: {
       accept: 'application/vnd.github.v3+json',
       'user-agent': 'octokit-rest.js/20.0.2 octokit-core.js/5.0.2 Node.js/20.11.1 (linux; x64)',
       authorization: 'token [REDACTED]',
       'content-type': 'application/json; charset=utf-8'
     },
     body: '{"content":"+1"}',
     request: { hook: [Function: bound bound register] }
   }
 }

@skjnldsv
Copy link
Member Author

// Add a reaction to the comment to indicate that we're processing it
try {
addReaction(octokit, task, Reaction.THUMBS_UP)
} catch (e) {
error(task, `Failed to add reaction to PR: ${e.message}`)
// continue, this is not a fatal error
}

@skjnldsv
Copy link
Member Author

4318e01 seems to fix it

try {
await addReaction(octokit, task, Reaction.THUMBS_UP)
} catch (e) {
error(task, `Failed to add reaction to PR: ${e.message}`)
// continue, this is not a fatal error
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant