diff options
author | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-12-11 16:35:17 +0100 |
---|---|---|
committer | Alejandro Sirgo Rica <asirgo@soleta.eu> | 2024-12-11 16:35:17 +0100 |
commit | a58587dc80f3406e7aa91eff46da6d19c881cf56 (patch) | |
tree | 0264a2f6a43eb33704858b4903c6751a8b1d13ae /COPYING | |
parent | 17644e584e47ca2cbc83874805b930d5c4275407 (diff) |
views: improve request error reporting
Add specific error messages for each http status code in the
function ogserver_error(). Pass the request object to obtain the
status code.
Standarize the error handling code for every get(), delete() and
post() as:
r = server.get('/scopes')
if not r:
return ogserver_down('scopes')
if r.status_code != requests.codes.ok:
return ogserver_error(r, 'scopes')
Diffstat (limited to 'COPYING')
0 files changed, 0 insertions, 0 deletions