[Bug 848103] [NEW] The REST API returns a 500 when requesting subscriptions for a nonexistent address.

Public bug reported: Requests to /addresses/missing@example.com/memberships causes an exception in Mailman so it returns a 500 instead of a 404. ** Affects: mailman Importance: Undecided Status: New ** Tags: mailman3 -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/848103 Title: The REST API returns a 500 when requesting subscriptions for a nonexistent address. To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/848103/+subscriptions

Here's a simple fix. ** Patch added: "test and fix patch" https://bugs.launchpad.net/mailman/+bug/848103/+attachment/2392495/+files/84... -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/848103 Title: The REST API returns a 500 when requesting subscriptions for a nonexistent address. To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/848103/+subscriptions

This sounds like a http.bad_request() not http.not_found(). -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/848103 Title: The REST API returns a 500 when requesting subscriptions for a nonexistent address. To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/848103/+subscriptions

Possibly, though the request would be valid if someone were to subscribe to a mailing list with that email address, which is why I lean towards 404. -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/848103 Title: The REST API returns a 500 when requesting subscriptions for a nonexistent address. To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/848103/+subscriptions

Agreed that for consistency, a 404 is a better error code. Thanks for the patch! ** Changed in: mailman Status: New => In Progress ** Changed in: mailman Importance: Undecided => Medium ** Changed in: mailman Assignee: (unassigned) => Barry Warsaw (barry) ** Changed in: mailman Milestone: None => 3.0.0a8 ** Changed in: mailman Status: In Progress => Fix Committed -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/848103 Title: The REST API returns a 500 when requesting subscriptions for a nonexistent address. To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/848103/+subscriptions

** Changed in: mailman Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Mailman Coders, which is subscribed to GNU Mailman. https://bugs.launchpad.net/bugs/848103 Title: The REST API returns a 500 when requesting subscriptions for a nonexistent address. To manage notifications about this bug go to: https://bugs.launchpad.net/mailman/+bug/848103/+subscriptions
participants (3)
-
Barry Warsaw
-
Neil Leathers
-
Stephen A. Goss