mirror of
https://github.com/valitydev/wazuh-kibana-app.git
synced 2024-11-07 02:15:24 +00:00
Return a rejected promise instead of throwing an error
This commit is contained in:
parent
989b3b3f5b
commit
1e6cc24668
@ -219,8 +219,7 @@ app.directive('wzXmlFileEditor', function() {
|
||||
return true;
|
||||
} catch (error) {
|
||||
$scope.configError = false;
|
||||
errorHandler.handle(error, 'Error asdfas');
|
||||
throw new Error(error);
|
||||
return Promise.reject(error);
|
||||
}
|
||||
};
|
||||
|
||||
@ -316,7 +315,7 @@ app.directive('wzXmlFileEditor', function() {
|
||||
} catch (error) {
|
||||
$scope.savingParam();
|
||||
if ((error || '').includes('Wazuh API error: 1905')) {
|
||||
$scope.configError = ["File name already exists"];
|
||||
$scope.configError = ['File name already exists'];
|
||||
$scope.$emit('showSaveAndOverwrite', {});
|
||||
} else {
|
||||
errorHandler.handle(error, 'Error');
|
||||
|
Loading…
Reference in New Issue
Block a user