🔧 fix: handle missing custom config speech (#3790)

* feat: Update speech settings retrieval logic to handle missing custom configuration

This commit updates the logic in the Speech component and the getCustomConfigSpeech function to handle the case where the custom configuration is missing. Previously, if no custom configuration was found, an error would occur. Now, the code checks for the presence of the custom configuration and returns a message indicating that no custom configuration was found. This improves the robustness of the application and provides a better user experience.

* refactor: changed response message when no custom config is found
This commit is contained in:
Marco Beretta 2024-08-27 06:09:04 -04:00 committed by GitHub
parent 34fd960d54
commit 62881fee54
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 3 deletions

View file

@ -127,7 +127,7 @@ function Speech() {
);
useEffect(() => {
if (data) {
if (data && data.message !== 'not_found') {
Object.entries(data).forEach(([key, value]) => {
updateSetting(key, value);
});