(lowerMessage, detail string)
| 398 | } |
| 399 | |
| 400 | func responsesAPIDiagnostic(lowerMessage, detail string) (string, bool) { |
| 401 | lowerDetail := strings.ToLower(detail) |
| 402 | for _, match := range responsesAPIDiagnosticMatches { |
| 403 | if strings.Contains(lowerMessage, match.pattern) || strings.Contains(lowerDetail, match.pattern) { |
| 404 | return match.detail, true |
| 405 | } |
| 406 | } |
| 407 | return "", false |
| 408 | } |
| 409 | |
| 410 | func normalizeClassification(classified ClassifiedError) ClassifiedError { |
| 411 | classified.Message = strings.TrimSpace(classified.Message) |