feature/gateway #21

Merged
master merged 4 commits from feature/gateway into main 2025-10-21 13:50:55 +02:00
Showing only changes of commit 85802c68db - Show all commits

View File

@@ -296,8 +296,10 @@ class WiFiConfigComponent extends Component {
]
});
if (!response.success) {
throw new Error(response.error || 'Failed to configure WiFi');
// Check if the API call was successful based on the response structure
if (!response || response.status !== 200) {
const errorMessage = response?.data?.message || response?.error || 'Failed to configure WiFi';
throw new Error(errorMessage);
}
return response;