Unverified Commit db0968f3 authored by Josh's avatar Josh Committed by GitHub
Browse files

fix dupe err message (#5857)

parent c0648233
...@@ -609,10 +609,9 @@ func (s *Server) CreateModelHandler(c *gin.Context) { ...@@ -609,10 +609,9 @@ func (s *Server) CreateModelHandler(c *gin.Context) {
defer cancel() defer cancel()
quantization := cmp.Or(r.Quantize, r.Quantization) quantization := cmp.Or(r.Quantize, r.Quantization)
if err := CreateModel(ctx, name, filepath.Dir(r.Path), strings.ToUpper(quantization), f, fn); err != nil { if err := CreateModel(ctx, name, filepath.Dir(r.Path), strings.ToUpper(quantization), f, fn); errors.Is(err, errBadTemplate) {
if errors.Is(err, errBadTemplate) { ch <- gin.H{"error": err.Error(), "status": http.StatusBadRequest}
ch <- gin.H{"error": err.Error(), "status": http.StatusBadRequest} } else if err != nil {
}
ch <- gin.H{"error": err.Error()} ch <- gin.H{"error": err.Error()}
} }
}() }()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment