mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
framework is there for everything else now. Works like this:
* If your form/API params are the same across all forms for a model object
(e.g. all Quota operations), they should be placed in mixins in
galaxy.web.params and can be used universally by both the UI and API.
* Validating params and performing the requestion actions go in mixins in
galaxy.actions. These return a value upon success or raise a
MessageException upon failure.
* Fetching objects with checks relevant to the web methods can be done via
BaseController.get_object and its wrappers (see other helpers in the
Mixins in galaxy.web.base.controller as well).
* This leaves UI controller methods to just handle the stuff related to
filling in web forms.
* The API methods should be making use of paste.httpexceptions.* for
handling error conditions. Also, I think it'd be best to generally
return an item's API value from most methods and include the "message" as
an entry in the return dict rather than just by itself as a string.
None of this is required, but it would be great to convert the existing stuff
to this new model.
galaxy.exceptions is a collection point for all custom exceptions.
The User API now returns current disk usage with a User's detailed information.
Exceptions in the API are now logged by the expose_api decorator and hidden
from the client.