You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add specific handling for pushing procedure with versions (#2421)
* Add specific handling for pushing procedure with versions
* Parse the error body
* Determine if the error is referencing models
having versions attached to them.
* Send an explicit error if this case exists.
* Use new copy for error
versionResponse:="{\"detail\": \"The following errors occurred:\n- This endpoint does not support models that have versions published with `cog push`.\",\"errors\":[{\"detail\":\"This endpoint does not support models that have versions published with `cog push`.\",\"pointer\": \"/\",}],\"status\":400,\"title\":\"Validation failed\"}"
365
+
w.WriteHeader(http.StatusBadRequest)
366
+
w.Write([]byte(versionResponse))
367
+
case"/v1/models/user/test/releases":
368
+
// Mock release creation response - empty body with 204 status
0 commit comments