Bruce MacDonald 11 miesięcy temu
rodzic
commit
938be81c45
1 zmienionych plików z 5 dodań i 4 usunięć
  1. 5 4
      server/routes.go

+ 5 - 4
server/routes.go

@@ -437,10 +437,11 @@ func (s *Server) TokenizeHandler(c *gin.Context) {
 
 	opts, err := modelOptions(model, req.Options)
 	if err != nil {
-		if errors.Is(err, api.ErrInvalidOpts) {
-			c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
-			return
-		}
+		// TODO: handle specific errors
+		// if errors.Is(err, api.ErrInvalidOpts) {
+		// 	c.JSON(http.StatusBadRequest, gin.H{"error": err.Error()})
+		// 	return
+		// }
 		c.JSON(http.StatusInternalServerError, gin.H{"error": err.Error()})
 		return
 	}