Working with API, I have a problem!! please help

Options
Hello..
i work with an API 
and when i call this API it shows problem.. 

that's okay for me, i want it when there's a bad request or there's any problem to return "0" as value.. 

how i can do this ? 

Comments

  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
    Hi, Mudi. You can build a conditional if/then statement reading the results, and act accordingly based on the status provided in the API response.
  • Mohammad Hamidi
    Options
    okay, but can you show me how ? because i try to make it like this, but it nott work or i don't know what is the right steps to do it. 

    can you tell me how to do it?
  • Chris Coleman
    Chris Coleman Administrator

    ADMIN

    Options
     Sure! We've got some great videos on our YouTube channel about how to use conditionals. Check out this video as well as our documentation on how to utilize them.