Giter Site home page Giter Site logo

Comments (5)

ibalosh avatar ibalosh commented on July 17, 2024

Hi @Benjam1n

hm, general PostmarkError by library is thrown when there is no regular response from Postmark.
From what I could see, timeout is happening when trying to connect to Postmark to send email by Template as you mentioned.

Some things that could be checked:

  • How often does the send call run?
  • Wondering if network connection on your side is stable on that server? How often do you get the error?
  • Can you run the postmark client outside of express route and see how it behaves then?
  • Wondering if you could do a call like ping test , to check connection from your machine to api.postmarkapp.com (call in shell would look like: ping api.postmarkapp.com)

These are the first things to check. We haven't seen yet any issues from customers related to timeout and sending, so these are the routes we think issue could be at.

Igor

from postmark.js.

ibalosh avatar ibalosh commented on July 17, 2024

Hi @Benjam1n

also try to experiment with timeout for the sake of test. For client the default is 30 seconds.
This call should increase it to 60: client.clientOptions.timeout=60

Igor

from postmark.js.

benpixel avatar benpixel commented on July 17, 2024

@ibalosh Thanks for the ideas! It's a actually a "webhook service", so when webhook hits the endpoints, email should be sent. It seems everything is alright when client.sendEmailWithTemplate is called outside the app.post. Changing timeout didn't help.

from postmark.js.

benpixel avatar benpixel commented on July 17, 2024

Uh, oh, it seems like this fixed everything:

app.post('/', jsonParser, async (request, response) => {
  await client.sendEmailWithTemplate({
  })
})

from postmark.js.

ibalosh avatar ibalosh commented on July 17, 2024

oh, glad to hear that!

hm, interesting, wondering why the usual promise format you used first did not work

from postmark.js.

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.