Fix error handling and formatting in component.py and typesStore.ts
This commit is contained in:
parent
6357752b24
commit
e2c0801aae
2 changed files with 2 additions and 4 deletions
|
|
@ -21,9 +21,7 @@ class ComponentFunctionEntrypointNameNullError(HTTPException):
|
||||||
|
|
||||||
class Component:
|
class Component:
|
||||||
ERROR_CODE_NULL: ClassVar[str] = "Python code must be provided."
|
ERROR_CODE_NULL: ClassVar[str] = "Python code must be provided."
|
||||||
ERROR_FUNCTION_ENTRYPOINT_NAME_NULL: ClassVar[str] = (
|
ERROR_FUNCTION_ENTRYPOINT_NAME_NULL: ClassVar[str] = "The name of the entrypoint function must be provided."
|
||||||
"The name of the entrypoint function must be provided."
|
|
||||||
)
|
|
||||||
|
|
||||||
code: Optional[str] = None
|
code: Optional[str] = None
|
||||||
_function_entrypoint_name: str = "build"
|
_function_entrypoint_name: str = "build"
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ export const useTypesStore = create<TypesStoreType>((set, get) => ({
|
||||||
data: { ...old.data, ...data },
|
data: { ...old.data, ...data },
|
||||||
templates: templatesGenerator(data),
|
templates: templatesGenerator(data),
|
||||||
}));
|
}));
|
||||||
setLoading(false)
|
setLoading(false);
|
||||||
resolve();
|
resolve();
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue