const failCallback = (error) => {
   let err_message = error.message;
   let err_body = error.additional.body;
   if (err_body && err_body.message) {
     err_message = error.additional.body.message;
   }
   UserNotification.error(`Testing Grok pattern "${pattern.name}" failed with status: ${err_message}`,
     "Could not test Grok pattern");
 };
 var failCallback = (error) => {
   let err_message = error.message;
   let err_body = error.additional.body;
   if (err_body && err_body.validation_errors && err_body.validation_errors._) {
     err_message = "";
     const errors = err_body.validation_errors._;
     for(let i = 0, len = errors.length; i < len; i++) {
       err_message = err_message.concat(errors[i].error);
     }
   }
   UserNotification.error("Importing Grok pattern file failed with status: " + err_message,
     "Could not load Grok patterns");
 };
 promise.catch((errorThrown) => {
     UserNotification.error('Details: ' + errorThrown,
         'Could not try regular expression. Make sure that it is valid.');
 });
 promise.catch((errorThrown) => {
     UserNotification.error('Details: ' + errorThrown,
         'We were not able to run the substring extraction. Please check index boundaries.');
 });
 promise.catch((error) => {
     if (error.additional.status !== 404) {
         UserNotification.error("Loading widget information failed with status: " + error,
             "Could not load widget information");
     }
 });
Beispiel #6
0
 }, (error) => {
   if (error.additional.status !== 404) {
     UserNotification.error("Delete user failed with status: " + error,
       "Could not delete user");
   }
 });
Beispiel #7
0
 (error) => {
   if (error.additional.status !== 404) {
     UserNotification.error("Loading user list failed with status: " + error,
       "Could not load user list");
   }
 });
 .catch(errorThrown => {
     UserNotification.error("Loading message information failed with status: " + errorThrown,
         "Could not load message information");
 });
 promise.catch((errorThrown) => {
     UserNotification.error('Details: ' + errorThrown, 'Could not check if lookup table translates the string');
 });
 promise.catch((errorThrown) => {
     UserNotification.error('Details: ' + errorThrown,
       'Could not check if field contains the string');
 });