Add request information in case of a request/server error
See original GitHub issueI’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:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Probot sets request information now v10
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