OHSUCMP / coach

web application frontend for OHSU HTN U18 grant
2 stars 0 forks source link

complete UI error reporting logic #167

Closed mattStorer closed 5 months ago

mattStorer commented 5 months ago

in a recent commit, I made some edits to how AJAX calls process responses, making better use of .done() and .always() functions. AJAX calls that perform updates or modifications of any sort now employ always() because those get called whether or not the response was successful (done() only gets called for successful calls, i.e. those with HTTP 200 responses). These new always() calls check the returned status, which if it's 200 then a successful response is processed.

many of these do not have else blocks to process unsuccessful responses. I added these blocks, but haven't filled them out yet, because that will require some additional UI work and testing that I didn't have time for just now. I did add todo comments in those blocks so it should be very apparent where the UI needs to trigger the display of error messages.

e.g.: image

this ticket is a call to get back in there and fill these parts out.

mattStorer commented 5 months ago

all done and thoroughly tested