question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add request information in case of a request/server error

See original GitHub issue

I’m trying to get milestone metadata when a probot app is added to a repo.

  app.on("installation_repositories.added", async (context) => {
    const repos = context.payload.repositories_added;

    for await (const repo of repos) {
      const repoId = repo.id;
      const senderId = context.payload.sender.id;

      const milestones = await context.github.issues.listMilestonesForRepo({
        owner: senderId,
        repo: repoId,
      });

      /// do something with milestones
    }
  });

However, I get this error

12:58:13.693Z ERROR event: Not Found (id=xxxxxxx)
  HttpError: Not Found
      at /Users/lukepighetti/development/misc/burncharts/probot-app/node_modules/@octokit/request/dist-node/index.js:66:23
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
      at async Job.doExecute (/Users/lukepighetti/development/misc/burncharts/probot-app/node_modules/bottleneck/light.js:405:18)
  --
  event: {
    "event": "installation_repositories.added",
    "id": "xxxxxx",
    "installation": xxxxx
  }
12:58:13.694Z ERROR probot: Not Found
  HttpError: Not Found
      at /Users/lukepighetti/development/misc/burncharts/probot-app/node_modules/@octokit/request/dist-node/index.js:66:23
      at processTicksAndRejections (internal/process/task_queues.js:97:5)
      at async Job.doExecute (/Users/lukepighetti/development/misc/burncharts/probot-app/node_modules/bottleneck/light.js:405:18)
12:58:13.694Z  INFO http: POST / 500 - 245.68 ms (id=xxxxxxx)
12:58:13.695Z ERROR probot: Internal Server Error
  Error: Internal Server Error
      at Request.callback (/Users/lukepighetti/development/misc/burncharts/probot-app/node_modules/superagent/lib/node/index.js:706:15)
      at IncomingMessage.<anonymous> (/Users/lukepighetti/development/misc/burncharts/probot-app/node_modules/superagent/lib/node/index.js:916:18)
      at IncomingMessage.emit (events.js:322:22)
      at IncomingMessage.EventEmitter.emit (domain.js:482:12)
      at endReadableNT (_stream_readable.js:1187:12)
      at processTicksAndRejections (internal/process/task_queues.js:84:21)

I’m not sure what “Not found” means or how to proceed.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
gr2mcommented, Nov 3, 2020

Probot sets request information now v10

1reaction
gr2mcommented, May 15, 2020

I agree, the error should include information about the request that has been sent. That is something that @octokit/rest does by default, I’m not sure why probot does not

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Fix a 400 Bad Request Error (Causes and Fixes) - Kinsta
How to Fix 400 Bad Request Error? · 1. Check the Submitted URL · 2. Clear Browser Cache · 3. Clear Browser Cookies...
Read more >
How to Fix a 400 Bad Request Error: 8 Easy Methods
Stuck with a 400 bad request error? Read this article to find out 8 simple methods to solve the problem and its possible...
Read more >
HTTP response status codes - MDN Web Docs - Mozilla
HTTP response status codes indicate whether a specific HTTP request has been successfully completed. Responses are grouped in five classes:
Read more >
Status codes in HTTP - W3C
Server has received the request but there is no information to send back, and the client should stay in the same document view....
Read more >
What is HTTP error 400 and how do you fix it? - IT PRO
A 400 Bad Request error can occur when the DNS data stored locally is out of sync with a website's registered DNS information...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found