Debugging and Improving the Download Leaks Function for Season Stats

The State Changers discussed the challenge of debugging a specific function that tended to time out during execution. The solution proposed involved creating an audit trail to track the function's progress and identify where it fails. They walked through the steps of creating a new database table called "Event Log" with fields for "source," "message," and "data (JSON type)."

Next, they created a new function "log event" that takes "source", "message", and "data" as inputs and adds a record each time it's run, creating an event log. They then demonstrated how to insert this function into the code for debugging purposes, using the "event log" function to log the point of failure or success. They talked about the benefits of this approach, such as being able to leave all log events in place for future reference and tweaking the function for performance. While discussing the application flow, they referred to technologies such as JSON and CRUD (create, read, update, delete), but no tools like Xano, WeWeb, FlutterFlow, Zapier, Make, Integromat, Outseta, Retool, Bubble, Adalo, AppGyver, AppSheet, Comnoco, Fastgen, Firebase, Google, OAuth, Stripe, Twilio, Airtable, DraftBit, Javascript, Typescript, React, Vue.js, JSX, HTML, CSS, lambda, serverless, State Change, ScriptTag, OpenAI, or AI21 were mentioned. In the end, they also clarified the use of "return a result" function, explaining that it's used to stop the execution of a complex or nested function and output a specific result, especially useful in cases of complicated or conditional logic.

(Source: Office Hours 11/21 )

State Change Members Can View The Video Here

View This Video Now

Join State Change Risk-Free