skip to Main Content

In Shopify, normally the Rates API call will succeed only if we return the rates within the 15 seconds. Else, it will display an error at the Checkout page.

I looked a glance at the webhook list in the settings page and seems like there is not such webhook for Rate API timeout error.
Is there any way to get notified of these scenarios?

2

Answers


  1. Chosen as BEST ANSWER

    Got solution for this scenario as below. We can usually listen for connection close event.

    app.post('/fetchrates', (req, res) => {
        req.on('close', () => {
            logger.debug("Shopify has aborted/closed the connection");
        });
    
        // <Logic for calculating the rates and returning the response>
    });
    

    This seems to be the best solution, since not only with the timeout, we can also get notified on gateway timeout(where the api endpoint has not been hitted into our system).


  2. If your App is failing to return a response in 15 seconds, you can easily see that yourself by monitoring the response times of your App. Most cloud providers will log your response times for you to see. If not there are plenty of monitoring tools designed to expose your App response times in an easy way. Try that.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search