user8208104
user8208104

Reputation:

GitHub Probot : ERROR probot: Bad Request

I am developing an application for Probot. I have configured .envand already downloaded PEM file in the folder.

Here is the content of file index.js.

module.exports = (robot) => {
robot.on('issues.opened', async context => {  
    const params = context.issue({ body: 'Hello World!' })
    return context.github.issues.createComment(params)
})
}

But I am getting this error.

  ERROR probot: Bad Request
  Error: Bad Request
      at Request.callback (/media/ashutosh/ASHUTOSH ( PERSONAL )/Gsoc/probot/practice/ashutosh-probot/node_modules/superagent/lib/node/index.js:696:15)
      at IncomingMessage.parser (/media/ashutosh/ASHUTOSH ( PERSONAL )/Gsoc/probot/practice/ashutosh-probot/node_modules/superagent/lib/node/index.js:906:18)
      at emitNone (events.js:111:20)
      at IncomingMessage.emit (events.js:208:7)
      at endReadableNT (_stream_readable.js:1064:12)
      at _combinedTickCallback (internal/process/next_tick.js:138:11)
      at process._tickDomainCallback (internal/process/next_tick.js:218:9)

How to fix this issue?

Upvotes: 3

Views: 1256

Answers (1)

abhijeetps
abhijeetps

Reputation: 5660

This error not because of Probot, but the error is on GitHub ends.

This error is possibly because you have entered wrong User authorization call back URL, while creating a new GitHub application. Updating this will fix the issue.

Create new GitHub Application

Upvotes: 1

Related Questions