Don't add 'error: ' to messages if already there
This commit is contained in:
		| @@ -128,7 +128,10 @@ func checkErr(err error, handleErr func(string)) { | |||||||
|  |  | ||||||
| 	msg, ok := StandardErrorMessage(err) | 	msg, ok := StandardErrorMessage(err) | ||||||
| 	if !ok { | 	if !ok { | ||||||
| 		msg = fmt.Sprintf("error: %s", err.Error()) | 		msg = err.Error() | ||||||
|  | 		if !strings.HasPrefix(msg, "error: ") { | ||||||
|  | 			msg = fmt.Sprintf("error: %s", msg) | ||||||
|  | 		} | ||||||
| 	} | 	} | ||||||
| 	handleErr(msg) | 	handleErr(msg) | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Clayton Coleman
					Clayton Coleman