Closed
Description
Related to #1, in order to retrieve public gists containing the word "svelte", I'm using (this time with a TOKEN):
const GistClient = require("gist-client");
const gistClient = new GistClient();
const GITHUB_TOKEN = "GITHUB_TOKEN";
gistClient
.setToken(GITHUB_TOKEN)
.getAll({
rawContent: true,
filterBy: [
{public: true},
{content: "svelte"},
{since: "2018-11-01T00:00:01Z"}
]
})
.then(gistList => {
console.log(JSON.stringify(gistList))
})
.catch(err => {
console.log(err)
});
but I get this error:
{ StatusCodeError: 502 - {"message":"Server Error"}
at new StatusCodeError (/path/to/node_modules/request-promise-core/lib/errors.js:32:15)
at /path/to/node_modules/request-promise-core/lib/plumbing.js:97:41
at process.internalTickCallback (internal/process/next_tick.js:77:7)
name: 'StatusCodeError',
statusCode: 502,
message: '502 - {"message":"Server Error"}',
error: { message: 'Server Error' },
options:
{ url:
'https://api.github.com/gists/public?per_page=100&since=2018-11-01T00%3A00%3A01Z&page=25',
headers:
{ Authorization: 'token TOKEN',
'User-Agent': 'GistClient' },
json: true,
transform: [Function: _includeHeadersTransformer],
callback: [Function: RP$callback],
simple: true,
resolveWithFullResponse: false,
transform2xxOnly: false },
response:
{ headers:
{ server: 'GitHub.com',
date: 'Sun, 02 Dec 2018 16:39:17 GMT',
'content-type': 'application/json',
'content-length': '32',
connection: 'close',
etag: '"tag"',
'x-github-request-id': 'id' },
data: { message: 'Server Error' } } }
Seems to fail at the 25th page. Am I doing something wrong? Thanks!
Metadata
Metadata
Assignees
Labels
No labels