Fix error handling and formatting in component.py and typesStore.ts

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-02-16 11:01:53 -03:00
commit e2c0801aae
2 changed files with 2 additions and 4 deletions

View file

@ -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"

View file

@ -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) => {