kadalu / moana

Moana is a frontend for the Kadalu Storage / GlusterFS. Moana provides tools for setting up and managing the Kadalu Storage / Gluster pools.
GNU General Public License v3.0
18 stars 7 forks source link

Refactor handling of API errors #287

Closed aravindavk closed 1 year ago

aravindavk commented 1 year ago

halt can only be used within the blocks and it will not work in other places. Reusing code was very difficult since all the logic should be placed in the ReST route blocks.

Now, API exception is introduced. This allows to move the common functionalities to one place and handle this exception in ReST routes.

Signed-off-by: Aravinda Vishwanathapura aravinda@kadalu.tech

aravindavk commented 1 year ago

WIP. Not all the halt calls replaced by api_exception.