mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-10-31 10:39:30 +00:00 
			
		
		
		
	Fix error code if else in webhooks (#10386)
This commit is contained in:
		
							parent
							
								
									63e285ef8f
								
							
						
					
					
						commit
						b42f457d88
					
				| @ -62,7 +62,7 @@ public class GChatWebhookPublisher extends AlertsActionPublisher { | |||||||
|         if (response.getStatus() >= 300 && response.getStatus() < 400) { |         if (response.getStatus() >= 300 && response.getStatus() < 400) { | ||||||
|           // 3xx response/redirection is not allowed for callback. Set the webhook state as in error |           // 3xx response/redirection is not allowed for callback. Set the webhook state as in error | ||||||
|           setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |           setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|         } else if (response.getStatus() >= 300 && response.getStatus() < 600) { |         } else if (response.getStatus() >= 400 && response.getStatus() < 600) { | ||||||
|           // 4xx, 5xx response retry delivering events after timeout |           // 4xx, 5xx response retry delivering events after timeout | ||||||
|           setNextBackOff(); |           setNextBackOff(); | ||||||
|           setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |           setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|  | |||||||
| @ -76,7 +76,7 @@ public class GenericWebhookPublisher extends AlertsActionPublisher { | |||||||
|       if (response.getStatus() >= 300 && response.getStatus() < 400) { |       if (response.getStatus() >= 300 && response.getStatus() < 400) { | ||||||
|         // 3xx response/redirection is not allowed for callback. Set the webhook state as in error |         // 3xx response/redirection is not allowed for callback. Set the webhook state as in error | ||||||
|         setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |         setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|       } else if (response.getStatus() >= 300 && response.getStatus() < 600) { |       } else if (response.getStatus() >= 400 && response.getStatus() < 600) { | ||||||
|         // 4xx, 5xx response retry delivering events after timeout |         // 4xx, 5xx response retry delivering events after timeout | ||||||
|         setNextBackOff(); |         setNextBackOff(); | ||||||
|         setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |         setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|  | |||||||
| @ -60,7 +60,7 @@ public class MSTeamsWebhookPublisher extends AlertsActionPublisher { | |||||||
|         if (response.getStatus() >= 300 && response.getStatus() < 400) { |         if (response.getStatus() >= 300 && response.getStatus() < 400) { | ||||||
|           // 3xx response/redirection is not allowed for callback. Set the webhook state as in error |           // 3xx response/redirection is not allowed for callback. Set the webhook state as in error | ||||||
|           setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |           setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|         } else if (response.getStatus() >= 300 && response.getStatus() < 600) { |         } else if (response.getStatus() >= 400 && response.getStatus() < 600) { | ||||||
|           // 4xx, 5xx response retry delivering events after timeout |           // 4xx, 5xx response retry delivering events after timeout | ||||||
|           setNextBackOff(); |           setNextBackOff(); | ||||||
|           setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |           setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|  | |||||||
| @ -61,7 +61,7 @@ public class SlackWebhookEventPublisher extends AlertsActionPublisher { | |||||||
|         if (response.getStatus() >= 300 && response.getStatus() < 400) { |         if (response.getStatus() >= 300 && response.getStatus() < 400) { | ||||||
|           // 3xx response/redirection is not allowed for callback. Set the webhook state as in error |           // 3xx response/redirection is not allowed for callback. Set the webhook state as in error | ||||||
|           setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |           setErrorStatus(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|         } else if (response.getStatus() >= 300 && response.getStatus() < 600) { |         } else if (response.getStatus() >= 400 && response.getStatus() < 600) { | ||||||
|           // 4xx, 5xx response retry delivering events after timeout |           // 4xx, 5xx response retry delivering events after timeout | ||||||
|           setNextBackOff(); |           setNextBackOff(); | ||||||
|           setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); |           setAwaitingRetry(attemptTime, response.getStatus(), response.getStatusInfo().getReasonPhrase()); | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Sriharsha Chintalapani
						Sriharsha Chintalapani