refactor: Handle error updating Component code in GenericNode

When updating the Component code in GenericNode, handle any errors that occur. If an error occurs, display an error message with instructions to report the issue on Discord or GitHub. This improves the error handling and user experience when updating the Component code.
This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-22 17:57:46 -03:00
commit 8f2232575d

View file

@ -239,6 +239,14 @@ export default function GenericNode({
}
})
.catch((err) => {
setErrorData({
title: "Error updating Compoenent code",
list: [
"There was an error updating the Component.",
"If the error persists, please report it on our Discord or GitHub.",
],
});
setLoadingUpdate(false);
console.log(err);
});
}