Skip to content
Snippets Groups Projects
Commit 4b8bf201 authored by Chris Hines's avatar Chris Hines
Browse files

I mean 401 status codes, not 403

parent 5626fe47
No related branches found
No related tags found
2 merge requests!11Dev,!6Dev
Pipeline #7186 passed
...@@ -223,9 +223,9 @@ class JobStat(Resource): ...@@ -223,9 +223,9 @@ class JobStat(Resource):
res = Ssh.execute(sshsess, host=host, user=user, cmd=cmd) res = Ssh.execute(sshsess, host=host, user=user, cmd=cmd)
except SshAgentException as e: except SshAgentException as e:
logger.error(e) logger.error(e)
flask_restful.abort(403, message="Identity error {}".format(e)) flask_restful.abort(401, message="Identity error {}".format(e))
except SshCtrlException as e: except SshCtrlException as e:
flask_restful.abort(403,message="We're having difficultly contacting {}. We failed with the message: {}".format(host,e)) flask_restful.abort(400,message="We're having difficultly contacting {}. We failed with the message: {}".format(host,e))
if not (res['stderr'] == '' or res['stderr'] is None or res['stderr'] == b''): if not (res['stderr'] == '' or res['stderr'] is None or res['stderr'] == b''):
logger.error(res['stderr']) logger.error(res['stderr'])
flask_restful.abort(400, message=res['stderr'].decode()) flask_restful.abort(400, message=res['stderr'].decode())
...@@ -295,7 +295,7 @@ class DirList(Resource): ...@@ -295,7 +295,7 @@ class DirList(Resource):
try: try:
dirls = json.loads(res['stdout'].decode()) dirls = json.loads(res['stdout'].decode())
except: except:
flask_restful.abort(403,message="You don't have permission to view that directory") flask_restful.abort(401,message="You don't have permission to view that directory")
else: else:
logger.debug('using ssh.sftpls') logger.debug('using ssh.sftpls')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment