Skip to content

Commit

Permalink
fix config is none
Browse files Browse the repository at this point in the history
  • Loading branch information
jp-agenta committed Dec 13, 2024
1 parent 3ad9536 commit 182eaa0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
6 changes: 6 additions & 0 deletions agenta-cli/agenta/sdk/decorators/routing.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,12 @@ async def run_wrapper(request: Request, *args, **kwargs) -> Any:
}
# LEGACY

if request.state.config["parameters"] is None:
raise HTTPException(
status_code=400,
detail="Config not found based on provided references.",
)

kwargs, _ = self.split_kwargs(kwargs, default_parameters)

return await self.execute_wrapper(request, False, *args, **kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,12 @@ async def run_wrapper(request: Request, *args, **kwargs) -> Any:
}
# LEGACY

if request.state.config["parameters"] is None:
raise HTTPException(
status_code=400,
detail="Config not found based on provided references.",
)

kwargs, _ = self.split_kwargs(kwargs, default_parameters)

# TODO: Why is this not used in the run_wrapper?
Expand Down

0 comments on commit 182eaa0

Please sign in to comment.