summaryrefslogtreecommitdiffstats
path: root/COPYING
diff options
context:
space:
mode:
authorAlejandro Sirgo Rica <asirgo@soleta.eu>2024-12-17 13:55:36 +0100
committerAlejandro Sirgo Rica <asirgo@soleta.eu>2024-12-17 16:04:09 +0100
commit05cba727e05308ada6ef65950724c5dc8dca45e4 (patch)
tree267decd77b30e8f736fa9460cf3534c15bc54c85 /COPYING
parentfd8da5de26c9a18a069e66c554ffd51f32cf86b8 (diff)
views: refactor http error handling
Throw ServerError in get(), post(), delete() server methods in case of connection error or status code with an error. Log the cause of the error to show it in the web. Add a function wrapper into every endpoint to handle the error redirection needed for the ServerError exception. The wrapper is defined by adding @handle_server_errors('XXX') on top of the function declaration, where XXX is the name of the function (endpoint) to be invoked by the redirection. This change removes the need of specific checks after every request and cleanups the endpoint code. Fix the endpoint of the main views to work with an unavailable ogserver.
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions