Skip to content

Feature/accounts error checking

Robert Sinton requested to merge feature/accounts_error_checking into master

Adds try/catch error handling to user account loading in the zon admin area, to distinguish backend errors from genuine lack of users. (Error message always reported "no users" previously).

Adds recognition of those errors in the front end by distinguishing actual errors from 404s in the content list plugin when doing initial data loads.

Also throws in some other error case handlers in the content list plugin.


Note: try/catch error handling is applied narrowly in the admin/accounts API endpoint users_get().

The alternative would be to apply it at the bitauth_userdata_model level, in the get_details() method, but too many other things call that and would have to be rewritten to handle the changed behaviour.

In particular, the case that prompted this was a database structure error causing the user lookup to fail. If this was implemented in the model, the admin dashboard and other areas would fail immediately. Ideally they should be updated at some point too…

Merge request reports