Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add handling for no workflow #66

Merged
merged 1 commit into from
Nov 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions app/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import logging
import os

from fastapi import Body
from fastapi import Body, HTTPException
import httpx
from pydantic import HttpUrl, ValidationError
from pydantic.tools import parse_obj_as
Expand All @@ -22,7 +22,7 @@

openapi_args = dict(
title="Workflow runner",
version="1.6.7",
version="1.6.8",
terms_of_service="",
translator_component="ARA",
translator_teams=["Standards Reference Implementation Team"],
Expand Down Expand Up @@ -94,7 +94,9 @@ async def run_workflow(
message = request_dict["message"]
qgraph = message["query_graph"]
message["auxiliary_graphs"] = message.get("auxiliary_graphs") or {}
workflow = request_dict["workflow"]
workflow = request_dict.get("workflow", [])
if not workflow:
raise HTTPException(400, "Request must include a workflow.")
logger = gen_logger()
log_level = request_dict.get("log_level", "ERROR")
logger.setLevel(logging._nameToLevel[log_level])
Expand Down
Loading