Giter VIP home page Giter VIP logo

Comments (4)

sandeepraju avatar sandeepraju commented on June 2, 2024

@beneloper can you tell us which api's response causes this issue?

from plivo-node.

beneloper avatar beneloper commented on June 2, 2024

send_message()

            var p = plivo.RestAPI(configs.plivo),
                plivoParams = {
                    'src': configs.PLIVO_SMS_SRC, // Caller Id
                    'dst' : phoneNumber, // User Number to Call
                    'text': msg,
                    'type': "sms"
                };
            p.send_message(plivoParams, function (status, response) {
                log.info('API status: %d, Response: %j', status, response);
                callback(null, response);
            });

from plivo-node.

sandeepraju avatar sandeepraju commented on June 2, 2024

@beneloper I tried this out and some more variants (like bulk sms, invalid params, etc). Worked fine to me. If you continue facing issues, please create a support ticket on your account dashboard providing request params, api_id, message_uuid.

from plivo-node.

beneloper avatar beneloper commented on June 2, 2024

We've used this for 5 months and it crashed few times so it's not easy to reproduce just to try few times. Anyway, I saw someone already fixed the issue in the latest version (lines 77-79 added). It's a good practice not to assume that the values returned are always non-null values, especially the module used (request) is from third party.

76  Request.post(request_options, function (error, response, body) {
77       if (error || !response) {             
78              return callback(500, body)
79       }
80       if (response.statusCode != 201) {
81           err = new PlivoError(error);
82       }
83       callback(response.statusCode, body);
84  });

from plivo-node.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.