-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
328 improve error message #4
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When I started digging into this, I realized it was messy (before you changed anything), so this is more of a refactoring.
We run all serer returned errors through this parser now, and the parser returns the errors into a standard format. If it's a pydantic error or a traceback, we format it correctly. If it's anything else, we show a generic simple human readable error. In all cases, we console.warn
the actual error so a developer can take a look.
In the future, we should probably evaluate errors more on the server side to determine how to handle them instead of this messy client code... maybe one day...
If you're ok with the changes and it works on your machine, ok to merge!
* set seed on dataset select & add options * basic functionality * move to utils, test, add node * attempt to run tests in cicd * add PAT * update coverage reporting * add coverage report to gitignore * refactor - only set bootstrap_seed for nested dichotomous * refactorings * tweak * standardize server error parsing * remove --------- Co-authored-by: Andy Shapiro <[email protected]>
* Multitumor and Nested Dichotomous (#264) * troubleshooting * format * trusted host all the things * update documentation * future flag change, rm background, testfix * lint * rm more background, testfix * unused import * testfix rm used for testing * docs * review fixes * formatting * formatting * to remove * remove testing * rm fake failing data * mt breadcrumbs * enable nested dichotomous * run all permutations of lsc/ilc * updates * build basic excel/word reports * ui stubs * litter data & bootstrap * enable nested dichotomous on frontend * sr, ll, chi^2 * model params, misc values matched * combined pvalue, -9999 -> ??? * excel exports * update UI for multitumor degree settings * MT excel exports * sketch placeholders * col headings, isSummary modal jank * more plug n play, formatting * rm t specific, reuse individual * tweak incompatibility, chasing loose ends * summary & parameter settings * add !isSummary * slightly less clonky? * misc cleanup * latest updates * updates from review * checkout `next`; tests will still fail --------- Co-authored-by: Andy Shapiro <[email protected]> * BMDS Desktop settings flag (#261) * sketch is_desktop * notes, add to config test * add further restrictions, override item limit, ui fix * pin pydantic to version 1.10.* series * updates * revise * wrap up desktop * final review --------- Co-authored-by: hausman-gdit <[email protected]> * UI updates for nested dichotomous and multitumor (#265) * set max height for dataset tables * fix layout issues with ND * add ND hover * make dataset y-size resizable * ND model options * ND read only options * add modal outputs * deployment updates * nested logistic UI updaets * complete nested dichotomous modal * fix resizing of dataset table * a few summary table/option updates * dont show multitumor model selection since there's only one * add ms combo summary tables * add CSF to summary table * multitumor updates * individual plot * show all models in result table; highlight selected * add multitumor plot * 4 dose groups * add bottom margin * simplify legend * expand use of TwoColumnTable * 293 mt min max datasets (#266) * increase MT datasets to 10 * decrease MT option set * move logic to store * update contraints on server to relax for desktop --------- Co-authored-by: Andy Shapiro <[email protected]> * Complete nested dichotomous summary table (#267) * wip * improve nested dichotomous table! * switch to ruff format (#271) * update python package versions (#268) * karen dev ev fix, package updates * sync frontend packages too * fix integration tests --------- Co-authored-by: Andy Shapiro <[email protected]> * integration tests - nested dichotomous + multitumor (#269) * basic ND MT test, tweak button language * update test data, R-O sketch * read-only update * misc changes * a few updates * add back change --------- Co-authored-by: Andy Shapiro <[email protected]> * 297 dynamic word export (#270) * change default download options * forgot this * big T little t, set defaults but still wonky model_type reset * oops * a little better * move logic to one location * delete * change default type to continuous --------- Co-authored-by: Andy Shapiro <[email protected]> * update to pydantic v2 (#273) * ran bump, tweaking * err message change, mod deprecated * future test tweak, forgot something, alias not working? * deprecated * more updates * fix tests * add key so that page updates * revert changes --------- Co-authored-by: hausman-gdit <[email protected]> * multitumor display edits (#272) * add residuals to summary table * rename model name * rename model average row * add bmd diamonds to multitumor result * lint * draw csf to bmdl, not bmd * (unrelated) update django version * add slope factor for individual models; see bmds PR 123 * add years context (#274) * remove zenodo.org badge (#278) * 283 polyk data link (#275) * try gitattribute fix before reset * add button for polyk * better * </> --> null * use flex layout for icons; update icon --------- Co-authored-by: Andy Shapiro <[email protected]> * polyk - copy dataset to clipboard for bmds modeling (#276) * add copy to clipboard * basic copied alert * clean up * missed one * missed another one * use ClipobardButton; add on optional click handler * removed store info --------- Co-authored-by: Andy Shapiro <[email protected]> * Add Word and Excel reports to Poly K adjustments (#277) * add download buttons and apis for polyk reports * wip * resketch * update integration with new polyk adjustment type * add tests for all api views * sync w/ latest bmds branch * pass dose_units --------- Co-authored-by: hausman-gdit <[email protected]> * add Desktop mode (#279) * hello desktop * start app * add logging * wip * updates * finish demo * cleanup * start server * start next steps * updates * add bmdsdesktop cli option * hacks for desktop demo * lint * enable wal * update .gitignore * wip - continue * double getter? * demo prep * add a few updates to the desktop * desktop updates * add collections * refactor homepage * updates to desktop * parsimony * add collections * include markdown in bundle * add package versions * fix integration tests * 2, 6 * Revert "2, 6" This reverts commit c8ecff5. * Run tests in CI (#5) * attempt to run tests in cicd * add PAT * update coverage reporting * add coverage report to gitignore * 324 random bootstrap seed (#1) * set seed on dataset select & add options * attempt to run tests in cicd * add PAT * update coverage reporting * add coverage report to gitignore * refactor - only set bootstrap_seed for nested dichotomous --------- Co-authored-by: Andy Shapiro <[email protected]> * 328 improve error message (#4) * set seed on dataset select & add options * basic functionality * move to utils, test, add node * attempt to run tests in cicd * add PAT * update coverage reporting * add coverage report to gitignore * refactor - only set bootstrap_seed for nested dichotomous * refactorings * tweak * standardize server error parsing * remove --------- Co-authored-by: Andy Shapiro <[email protected]> * 321 improve nomenclature for statistical outputs (#2) * 8 * 25a, 26, 30 comment * 27, 29, 33, 34, 35 * 2, 6 * 31 * testfix * rm comment, 31 * 3 note, 2, 5a, 12, 24, rm comment * js eol lf * revert MT * rename percentile to cummulative probability * resize tables as needed * remove change * fix test w/ degree symbol * rename log likelihood globally * fix bug in layout * rename scaled residual * rename DOF to d.f. * change Summary to Modeling Summary * rename "Abs(Residual of interest)" -> "|Residual near BMD|" * rename "Frequentist Model Results" to "Maximum Likelihood Approach Model Results" * title case * add vertical spacing * Change "Confidence Level" to "Confidence Level (one-sided)" globally * add on bound footnote to UI * handle goodness of fit table * use < and > instead of less than and greater than * only show tail probability if hybrid continuous bmr * make format --------- Co-authored-by: Andy Shapiro <[email protected]> * EPA Template CSS updates * fix branch info * pull in content for usepa/hawc * fix animation * add sticky top --------- Co-authored-by: Andy Shapiro <[email protected]>
Closes #328
Standardizes how all server errors are parsed and handled on the UI. If the errors are in pydantic format or a python traceback, we can display a human readable error message with information about the issue.
If the errors are in an unknown format, we show a generic human readable error message.
In all cases, the actual errors are shown in the console for developers.