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
// Update all categories for this crate, collecting any invalid categories
386
386
// in order to be able to warn about them
387
-
let ignored_invalid_categories = Category::update_crate(conn,&krate,&categories)?;
387
+
let unknown_categories = Category::update_crate(conn,&krate,&categories)?;
388
+
if !unknown_categories.is_empty(){
389
+
let unknown_categories = unknown_categories.join(", ");
390
+
let domain = &app.config.domain_name;
391
+
returnErr(bad_request(format!("The following category slugs are not currently supported on crates.io: {}\n\nSee https://{}/category_slugs for a list of supported slugs.", unknown_categories, domain)));
assert_snapshot!(response.text(), @r#"{"errors":[{"detail":"The following category slugs are not currently supported on crates.io: bar\n\nSee https://crates.io/category_slugs for a list of supported slugs."}]}"#);
0 commit comments