skip to Main Content

Javascript – How to display error body on front end using axios

My fast api end point is here: @app.post("/api/signup", status_code=status.HTTP_200_OK) async def signup( credentials : signupcred ): try: print(credentials.email, credentials.password1, credentials.name ) response = account.create(email= credentials.email, password= credentials.password1, name = credentials.name , user_id= ID.unique() ) return {response} except Exception as e:…

VIEW QUESTION

Html – Changing HX-GET using JavaScript doesn't change the result?

I'm looking for help with HTMX. I writing a simple FastAPI app with HTMX and Tailwind and MongoDB database. I have such a form: <form id="currencyForm" hx-get="/currency_history_check/EUR" hx-target="#result" hx-swap="innerHTML"> <select name="currency_id" id="currency_id" onchange="updateFormAction()"> </select> <button type="submit">Submit</button> </form> <div id="result"> </div>…

VIEW QUESTION
Back To Top
Search