mirror of
				https://github.com/grafana/grafana.git
				synced 2025-02-25 18:55:37 -06:00 
			
		
		
		
	cloudwatch: handle invalid time ranges
This commit is contained in:
		@@ -211,8 +211,8 @@ func (e *CloudWatchExecutor) executeQuery(ctx context.Context, query *CloudWatch
 | 
			
		||||
		return nil, err
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if endTime.Before(startTime) {
 | 
			
		||||
		return nil, fmt.Errorf("Invalid time range: End time can't be before start time")
 | 
			
		||||
	if !startTime.Before(endTime) {
 | 
			
		||||
		return nil, fmt.Errorf("Invalid time range: Start time must be before end time")
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	params := &cloudwatch.GetMetricStatisticsInput{
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user