Prevent Slack Event API retry call if the callback returns the error response.
func handler(w http.ResponseWriter, r *http.Request) {
// Process something...
// Set "X-Slack-No-Retry: 1" if prevent retry.
w.Header().Set("X-Slack-No-Retry", "1")
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusBadRequest)
w.Write([]byte(""))
}
Top comments (0)