Where communities thrive

  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
Repo info
    Daniel Payne
    im having a mem leak with the new tough cookie filling up the heap
    (node:19286) UnhandledPromiseRejectionWarning: StatusCodeError: 400 - {"error":{"message":"INVALID_PARAMETERS"}}
    .. I am having this error on my terminal while tryin to get a request and i have handled the promise well i think.. here it is.... createInvoices: (whose, payload) => {
    return new Promise((resolve, reject) => {
    .then(token => {
    var options = {
    url: config.api.invoices,
    method: "POST",
    json: true,
    headers: {
    authorization: Bearer ${token}
    body: payload
    rp(options).then(crtdinvoice => {
    // resolve(data)
                }) .catch(err => {
    Nicolai Kamenzky
    I think you are missing the catch for the promise returned by self.login(...)
    Lucas Kohorst

    Hi guys I am working on using react and corenlp for a project. corenlp depends on request-promise-native. When I start my react app I get an error ./node_modules/corenlp/dist/connector/connector-serer.js Module not found: Can't resolve 'request-promise-native'

    Even though I have request-promise-native in my package.json

    Hey, had a quick question
    when running mocha from CLI, all of the request-promise promises are logging out; its super annoying
    any way to suppress the logs?
    i understand it's a bit out of context question
    hello guys, i'm trying to upgrade my code and put a kind of tracker, like i'll receive de coord and use with API google maps, but this is happening
    let requestPromise = require ("request-promise"), this is de code that is doing this error
    Mohammed Yassine CHRAIBI

    Hi guys !
    I am having quite a problem here (js beginner here)
    I wrote this piece of code (reduced for simplicity) and I cannot get the html from each promise

    const rp = require('request-promise');
    for (__) {
    .then(html => {
    // Get ids from html
    const $ = cheerio.load(html);
    .then(ids => {
    // Store the ids in array and return the promises
    return Promise.all(ids.map(id => request({
    uri: JOB_URL + id,
    resolveWithFullResponse: true
    .then(jobs => {
    // Grab information
    // I cannot load the html since an object is returned
    // I assume all promises are resolved since there are no errors
    jobs.forEach(job => {
    // ....
    .catch((error) => {

    Basically I load the first page from which I get IDs, store them in the array and use it to send one request per element in the array. I don't however have access to the returned html, I get an object instead.
    Help? Anyone?
    Thanks !

    Mohammed Yassine CHRAIBI
    @Gabriellog did you run npm install?
    if you did, delete node_modules folder and re-run it, I think that should do it
    hi @analog-nico currently i am using request-promise in Google cloud function for post API call but getting the error "RequestError: Error: getaddrinfo EAI_AGAIN". Am sending the Authorization in header as well.
    function sendData() {
    console.log("*sendData **");
    var options = {
    method: 'POST',
    uri: 'https://xxxxx/oauth/token?grant_type=client_credentials',
    headers: {
    'Authorization': 'Basic dfdSOU1TOER1LVI3ejdpdfddlck9tOm1sUGQxdHBTdGFaSmJpcU1USHRsdTVVQ1dVRU8tQ0Rl'
    json: true
        .then((parsedBody) => {
        console.log("***********printing response************");
        .catch((err) => {
          console.log("error caughttt :"+err);
    sorry i am masking the url. Can you help me why authorization is not taking even though i am setting in headers
    i am trying with different options from Google cloud with axios, async axios as well, authorization is not considering. Trying with request-promise as well. Any idea what could be the issue
    even i have declared - const rp = require('request-promise');
    @analog-nico any suggestions for the error which is happening only in google cloud platform
    Amar DK
    Hello Guyz Please Help I AM Facing Issue In Promise Return
    When I Return Promise Data
    console.log("Checking Locally Error", promiseData)
    It is Showing Like This Checking Locally Error====> Promise {
    {data:1, name:"xyz"},
    I Want to get promiseData[0].data and promiseData[1].data
    How to retrive please any1 Help Me Please Guyz.
    Rakan Khirbik
    Hello, request/request-promise supports google-protobuf requests/responses?
    I am trying to hit a graphql end point with below code,it gives me a 403 error,i can access the endpoint through postman properly . Note i am using the bearer token directly in the request.
    StatusCodeError: 403 - "<html>\r\n<head><title>403 Forbidden</title></head>\r\n<body>\r\n<center><h1>403 Forbidden</h1></center>\r\n<hr><center>nginx/1.17.6</center>\r\n</body>\r\n</html>\r\n"
    at new StatusCodeError (node_modules/request-promise-core/lib/errors.js:32:15)
    at Request.plumbing.callback (node_modules/request-promise-core/lib/plumbing.js:104:33)
    at Request.RP$callback [as _callback] (node_modules/request-promise-core/lib/plumbing.js:46:31)
    at Request.self.callback (node_modules/request/request.js:185:22)
    at Request.<anonymous> (node_modules/request/request.js:1154:10)
    at IncomingMessage.<anonymous> (node_modules/request/request.js:1076:12)
    var options = {
    method: 'POST',
    json: true,
    headers: {
    'User-Agent': 'Request-Promise',
    "Authorization": Bearer ${authToken},
    "Content-Type": 'application/json',
    "Accept": '/',
        const res = await rp({uri:API,options,"rejectUnauthorized": false})