flask_restful.abort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e))
#return json.dumps({'message':"We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e)}), 400
#flask_restful.abort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e))
returnapiabort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e))
exceptExceptionase:
exceptExceptionase:
importtraceback
importtraceback
logger.error(e)
logger.error(e)
logger.error(traceback.format_exc())
logger.error(traceback.format_exc())
flask_restful.abort(500,message="jobcancel failed in some unexpected way")
#return json.dumps({'message':"jobcancel failed in some unexpected way"}), 500
#flask_restful.abort(500,message="jobcancel failed in some unexpected way")
returnapiabort(500,message="jobcancel failed in some unexpected way")
...
@@ -356,23 +379,31 @@ class JobSubmit(Resource):
...
@@ -356,23 +379,31 @@ class JobSubmit(Resource):
logger.error('body')
logger.error('body')
logger.error(request.data)
logger.error(request.data)
logger.error('end body')
logger.error('end body')
flask_restful.abort(400,message='Incomplete job information was passed to the backend.')
#return json.dumps({'message':'Incomplete job information was passed to the backend.'}), 400
#flask_restful.abort(400, message='Incomplete job information was passed to the backend.')
returnapiabort(400,message='Incomplete job information was passed to the backend.')
flask_restful.abort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e))
#return json.dumps({'message':"We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e)}), 400
#flask_restful.abort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e))
returnapiabort(400,message="We're having difficultly contacting {}. We failed with the message {}".format(params['identity']['site']['host'],e))