My API seems to run multiple times, is this a front-end or backend issue?

Options
Xano Support Chat
Xano Support Chat Administrator

ADMIN

edited January 2023 in ? Working with APIs

Hello, I've noticed that every once in a while, some of my API's are run multiple times. For example, in the screenshot below, someone was trying to verify the OTP for login and instead of the API running once, it ran like 12 separate times back to back (just showing some of them in screenshot). My question is, is this a backend problem I need to fix in the function stack or is this caused from the frontend


Tagged:

Best Answer

  • Xano Support Chat
    Xano Support Chat Administrator

    ADMIN

    edited January 2023 Answer ✓
    Options

    Hey! This is a great question. This would be due to the API being called multiple times by the front-end. We've definitely seen this before where the front-end logic/workflow/code calls the API multiple times.

Answers

  • Xano Support Chat
    Xano Support Chat Administrator

    ADMIN

    Options

    Would that signal a potential bug in the frontend? Because, 90% of the time this API is only called once and is successful and then every once in a while this happens

  • Xano Support Chat
    Xano Support Chat Administrator

    ADMIN

    Options

    It's quite possible but I wouldn't be able to diagnose a front-end bug. It'd be worth closely debugging how the call is performed in the front-end in tandem with checking the request history. And also checking with your front-end's support team