Understanding Error Handling and Invoking Functions on Page Load with Webflow and Xano API

During the meeting, the team discussed two main topics: error handling using try-catch and when to use the window or document to invoke a function for page load. They also talked about Webflow and its push feature, which allows functions to be invoked after Webflow has loaded. The team examined how to add a script tag and use Webflow push to ensure that the code doesn't run until the Webflow code has been initialized. They also touched upon the concept of Webflow objects and how they work. The team concluded that using Webflow push is the preferred method for performing tasks related to Webflow.


Regarding error handling, the team discussed the use of try-catch and how it should be applied within each function. They emphasized that try-catch should be used for situations where recovery or user feedback is required. It was also noted that wrapping the entire code in one try-catch may not be as effective as having more precise try-catch blocks within specific functions. The team further explained that Xano does not automatically handle external API errors, such as HTTP 500, so developers need to be aware of handling those situations themselves. Overall, the meeting provided insights into error handling and the usage of Webflow and its push feature for better code organization and initialization.


(Source: Office Hours 5/2 )

State Change Members Can View The Video Here
chris-montgomery-smgTvepind4-unsplash.jpg

View This Video Now

Join State Change Risk-Free