mirror of https://github.com/grafana/grafana.git
				
				
				
			Annotations: Fixes issue with showing error notice for cancelled annotation queries (#27557)
This commit is contained in:
		
							parent
							
								
									eb970a4985
								
							
						
					
					
						commit
						b37e132cec
					
				| 
						 | 
				
			
			@ -342,6 +342,7 @@ export class BackendSrv implements BackendService {
 | 
			
		|||
        // in throwIfEmpty we'll then throw an cancelled error and then we'll return the correct result in the catchError or rethrow
 | 
			
		||||
        throwIfEmpty(() => ({
 | 
			
		||||
          type: DataQueryErrorType.Cancelled,
 | 
			
		||||
          cancelled: true,
 | 
			
		||||
          data: null,
 | 
			
		||||
          status: this.HTTP_REQUEST_CANCELED,
 | 
			
		||||
          statusText: 'Request was aborted',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -353,6 +353,7 @@ describe('backendSrv', () => {
 | 
			
		|||
 | 
			
		||||
        expect(slowError).toEqual({
 | 
			
		||||
          type: DataQueryErrorType.Cancelled,
 | 
			
		||||
          cancelled: true,
 | 
			
		||||
          data: null,
 | 
			
		||||
          status: -1,
 | 
			
		||||
          statusText: 'Request was aborted',
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue