Explorar o código

update db exception convert

ls %!s(int64=2) %!d(string=hai) anos
pai
achega
970a70dd11
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      db/config.go

+ 6 - 0
db/config.go

@@ -79,6 +79,12 @@ func ReplyToReplyData(reply Reply) *myth.ReplyData {
 			status = myth.ErrUnAuthorized
 		case ErrNotConnect:
 			status = myth.ErrNotFound
+		case ErrExpired:
+			status = myth.ErrNotAllowed
+		case ErrInsufficientBalance:
+			status = myth.ErrNotAllowed
+		case ErrCreditLimit:
+			status = myth.ErrNotAllowed
 		}
 		return myth.ReplyErr(status, reply.LastErr.Error())
 	}