Sfoglia il codice sorgente

update db exception convert

ls 2 anni fa
parent
commit
970a70dd11
1 ha cambiato i file con 6 aggiunte e 0 eliminazioni
  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())
 	}