GithubHelp home page GithubHelp logo

Comments (5)

thomas-topway-it avatar thomas-topway-it commented on September 8, 2024 1

hello, we have solved with a simple await instruction, apparently the app redirected to a new route before that the request was completed

from twilio-node.

kareig avatar kareig commented on September 8, 2024

going over source i see there are all the undocumented options i could use and will try them: options

from twilio-node.

thomas-topway-it avatar thomas-topway-it commented on September 8, 2024

hello @kareig , we are having the same problem using it from svelte (vercel) server-side. Finally how have you solved it ?

Here is our import

import TwilioSdk from 'twilio';
const twilio = TwilioSdk(accountSid, authToken, {
  lazyLoading: false,
  autoRetry: true,
  maxRetries: 3,
  logLevel: 'debug',
});

from twilio-node.

kareig avatar kareig commented on September 8, 2024

Hi @thomas-topway-it,

Few things solved our issues we had:

  1. adding timeout/retry on twilio client:
const twilioClient = context.getTwilioClient({
      autoRetry: true,
      maxRetries: 3,
      maxRetryDelay: 500,
      defaultTimeout: 1000,
    });
  1. We also ship logs to external source so we had to set wait timeout for 1s for each callback, otherwise twilio function terminates immediately and no logs shipped to external endpoint:
return setTimeout(() =>
          callback(null, getSuccessResponse("SMS", messageSid), 1000)
        );
  1. We also asked to extend timeout on our server-side vendor to wait for 10s from twilio (which is hard limit runtime) and only then timeout but with retries this probably does not make sense anymore.

Mostly timeout/retries for twilio client solved our issues because now we get a proper response from twilio client instantly and it does not hit a hard limit of 10s and runtime does not timeout without any response in case phone number is blocked or combination of twilio sender and receive is not allowed.

from twilio-node.

tiwarishubham635 avatar tiwarishubham635 commented on September 8, 2024

Is this still an issue?

from twilio-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.