mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
CloudWatch Logs: Fix crash when no region is configured (#37639)
This commit is contained in:
@@ -119,7 +119,15 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
||||
label: logGroup,
|
||||
}));
|
||||
} catch (err) {
|
||||
dispatch(notifyApp(createErrorNotification(err)));
|
||||
let errMessage = 'unknown error';
|
||||
if (typeof err !== 'string') {
|
||||
try {
|
||||
errMessage = JSON.stringify(err);
|
||||
} catch (e) {}
|
||||
} else {
|
||||
errMessage = err;
|
||||
}
|
||||
dispatch(notifyApp(createErrorNotification(errMessage)));
|
||||
return [];
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user