standardize + improve error handling in api and app
remove special handling for errors in api endpoints; let the error handlers handle it! that's their job
refactor many db queries so that the conversion into dictionaries is explicit rather than subtle and implicit; code is now more verbose but much clearer what's happening (and mypy doesn't complain)
fix many typing / linting complaints, as well as some edge case bugs
changes