🐛 fix(types.py): fix indentation and remove duplicate docstring to improve code readability
🔥 chore(types.py): remove unused variable 'e' and improve exception handling by adding 'from exc' to preserve original traceback
This commit is contained in:
parent
887d1d8f79
commit
6500d793d1
1 changed files with 3 additions and 3 deletions
|
|
@ -289,8 +289,8 @@ def add_base_classes(frontend_node, return_types: List[str]):
|
|||
|
||||
|
||||
def build_langchain_template_custom_component(custom_component: CustomComponent):
|
||||
"""Build a custom component template for the langchain"""
|
||||
try:
|
||||
"""Build a custom component template for the langchain"""
|
||||
logger.debug("Building custom component template")
|
||||
frontend_node = build_frontend_node(custom_component)
|
||||
|
||||
|
|
@ -316,7 +316,7 @@ def build_langchain_template_custom_component(custom_component: CustomComponent)
|
|||
)
|
||||
logger.debug("Added base classes")
|
||||
return frontend_node
|
||||
except Exception as e:
|
||||
except Exception as exc:
|
||||
raise HTTPException(
|
||||
status_code=400,
|
||||
detail={
|
||||
|
|
@ -325,7 +325,7 @@ def build_langchain_template_custom_component(custom_component: CustomComponent)
|
|||
),
|
||||
"traceback": traceback.format_exc(),
|
||||
},
|
||||
)
|
||||
) from exc
|
||||
|
||||
|
||||
def load_files_from_path(path: str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue