mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 17:28:26 -04:00
parent
7c5c610c14
commit
29dd4602d1
5 changed files with 10 additions and 13 deletions
|
@ -494,7 +494,7 @@ module
|
|||
.catch((err) => {
|
||||
// TODO - display error in cards saying data could not be loaded.
|
||||
console.log('DataVisualizer - error getting stats for metric cards from elasticsearch:', err);
|
||||
if (err.status === 500) {
|
||||
if (err.statusCode === 500) {
|
||||
notify.error(`Error loading data for metrics in index ${indexPattern.title}. ${err.message}. ` +
|
||||
'The request may have timed out. Try using a smaller sample size or narrowing the time range.',
|
||||
{ lifetime: 30000 });
|
||||
|
@ -545,7 +545,7 @@ module
|
|||
.catch((err) => {
|
||||
// TODO - display error in cards saying data could not be loaded.
|
||||
console.log('DataVisualizer - error getting non metric field stats from elasticsearch:', err);
|
||||
if (err.status === 500) {
|
||||
if (err.statusCode === 500) {
|
||||
notify.error(`Error loading data for fields in index ${indexPattern.title}. ${err.message}. ` +
|
||||
'The request may have timed out. Try using a smaller sample size or narrowing the time range.',
|
||||
{ lifetime: 30000 });
|
||||
|
@ -595,7 +595,7 @@ module
|
|||
.catch((err) => {
|
||||
// TODO - display error in cards saying data could not be loaded.
|
||||
console.log('DataVisualizer - error getting overall stats from elasticsearch:', err);
|
||||
if (err.status === 500) {
|
||||
if (err.statusCode === 500) {
|
||||
notify.error(`Error loading data for fields in index ${indexPattern.title}. ${err.message}. ` +
|
||||
'The request may have timed out. Try using a smaller sample size or narrowing the time range.',
|
||||
{ lifetime: 30000 });
|
||||
|
|
|
@ -95,16 +95,17 @@ module.controller('MlJobTimepickerModal', function (
|
|||
doStart();
|
||||
})
|
||||
.catch((resp) => {
|
||||
if (resp.status === 409) {
|
||||
if (resp.statusCode === 409) {
|
||||
doStart();
|
||||
} else {
|
||||
if (resp.status === 500) {
|
||||
if (resp.statusCode === 500) {
|
||||
if (doStartCalled === false) {
|
||||
// doStart hasn't been called yet, this 500 has returned before 10s,
|
||||
// so it's not due to a timeout
|
||||
msgs.error(`Could not open ${$scope.jobId}`, resp);
|
||||
}
|
||||
} else {
|
||||
// console.log(resp);
|
||||
msgs.error(`Could not open ${$scope.jobId}`, resp);
|
||||
}
|
||||
$scope.saveLock = false;
|
||||
|
|
|
@ -30,7 +30,7 @@ export function getMlNodeCount() {
|
|||
})
|
||||
.catch((error) => {
|
||||
mlNodeCount = 0;
|
||||
if (error.status === 403) {
|
||||
if (error.statusCode === 403) {
|
||||
userHasPermissionToViewMlNodeCount = false;
|
||||
} else {
|
||||
console.error(error);
|
||||
|
|
|
@ -39,11 +39,7 @@ export function http(options) {
|
|||
|
||||
fetch(url, payload)
|
||||
.then((resp) => {
|
||||
if (resp.ok === true) {
|
||||
resolve(resp.json());
|
||||
} else {
|
||||
reject(resp);
|
||||
}
|
||||
resp.json().then((resp.ok === true) ? resolve : reject);
|
||||
})
|
||||
.catch((resp) => {
|
||||
reject(resp);
|
||||
|
|
|
@ -492,7 +492,7 @@ class JobService {
|
|||
}
|
||||
|
||||
function deleteFailed(resp, txt) {
|
||||
if (resp.status === 500) {
|
||||
if (resp.statusCode === 500) {
|
||||
status.errorMessage = txt;
|
||||
}
|
||||
reject({ success: false });
|
||||
|
@ -905,7 +905,7 @@ class JobService {
|
|||
})
|
||||
.catch((err) => {
|
||||
console.log('jobService error stopping datafeed:', err);
|
||||
if (err.status === 500) {
|
||||
if (err.statusCode === 500) {
|
||||
msgs.error('Could not stop datafeed for ' + jobId);
|
||||
msgs.error('Request may have timed out and may still be running in the background.');
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue