adjust missing condition context variable HTTP error

pull/2960/head
Kieran Prasch 2022-09-21 16:47:21 +02:00
parent e5fb972d2a
commit af3820bdb4
1 changed files with 3 additions and 3 deletions

View File

@ -237,9 +237,9 @@ def _make_rest_app(datastore: Datastore, this_node, log: Logger) -> Flask:
log.info(f'Evaluating decryption condition')
lingo.eval(**context)
except RequiredContextVariable as e:
message = f"Missing required inputs - {e}" # TODO: be more specific and name the missing inputs, etc
# TODO BAD_REQUEST instead of FORBIDDEN?
error = (message, HTTPStatus.FORBIDDEN)
message = f"Missing required inputs - {e}"
# TODO: be more specific and name the missing inputs, etc
error = (message, HTTPStatus.BAD_REQUEST)
log.info(message)
return Response(str(e), status=error[1])
except InvalidContextVariableData as e: