func HashForGrouping(requestBody []byte) (string, error) {
	hasher = md5.New()
	var sentryData SentryData
	err := json.Unmarshal(requestBody, &sentryData)
	if err != nil {
		log.Error(err)
		return "", err
	}
	if len(sentryData.Exception.Values) > 0 {
		return sentryData.hashForFramesInException(), nil
	} else if sentryData.Message != "" || sentryData.Culprit != "" {
		return sentryData.hashStrings([]string{sentryData.Message, sentryData.Culprit}), nil
	}
	return "", err
}
// Try to calculate the hash using the most specific data first (stacktraces),
// but if they don't exist fallback to just the message and culprit
Try to calculate the hash using the most specific data first (stacktraces),
but if they don't exist fallback to just the message and culprit
// Try to calculate the hash using the most specific data first ( stacktraces ) // but if they don ' t exist fallback to just the message and culprit
func HashForGrouping(requestBody []byte) (string, error) {
	hasher = md5.New()
	var sentryData SentryData
	err := json.Unmarshal(requestBody, &sentryData)
	if err != nil {
		log.Error(err)
		return "", err
	}
	if len(sentryData.Exception.Values) > 0 {
		return sentryData.hashForFramesInException(), nil
	} else if sentryData.Message != "" || sentryData.Culprit != "" {
		return sentryData.hashStrings([]string{sentryData.Message, sentryData.Culprit}), nil
	}
	return "", err
}
func HashForGrouping ( requestBody [ ] byte ) ( string , error ) { hasher = md5 . New ( ) var sentryData SentryData err := json . Unmarshal ( requestBody , & sentryData ) if err != nil { log . Error ( err ) return " " , err } if len ( sentryData . Exception . Values ) > 0 { return sentryData . hashForFramesInException ( ) , nil } else if sentryData . Message != " " || sentryData . Culprit != " " { return sentryData . hashStrings ( [ ] string { sentryData . Message , sentryData . Culprit } ) , nil } return " " , err }
Try to calculate the hash using the most specific data first (stacktraces),
but if they don't exist fallback to just the message and culprit
Try to calculate the hash using the most specific data first ( stacktraces ) but if they don ' t exist fallback to just the message and culprit