add test normal response for send message

This commit is contained in:
zhiqiang feng
2020-09-17 10:00:38 +08:00
parent 49d4b0c32a
commit a37ccea83f
2 changed files with 12 additions and 1 deletions
+4 -1
View File
@@ -127,7 +127,10 @@ func GetMsgs(soap string) []string {
func GetErrMsg(soap string) string {
r, _ := regexp.Compile(errExp)
msg := r.FindAllString(soap, -1)
if len(msg) > 0 && len(msg[0]) > 40 {
if len(msg) < 1 {
return ""
}
if len(msg[0]) > 40 {
size := len(msg[0])
return msg[0][54 : size-15]
}