The REST API returns a 500 when requesting subscriptions for a nonexistent address.

Bug #848103 reported by Stephen A. Goss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
GNU Mailman
Fix Released
Medium
Barry Warsaw

Bug Description

Requests to /<email address hidden>/memberships causes an exception in Mailman so it returns a 500 instead of a 404.

Tags: mailman3
Revision history for this message
Stephen A. Goss (postfuturist) wrote :

Here's a simple fix.

Revision history for this message
Neil Leathers (neil-leathers-rogers-deactivatedaccount) wrote :

This sounds like a http.bad_request() not http.not_found().

Revision history for this message
Stephen A. Goss (postfuturist) wrote :

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.

Revision history for this message
Barry Warsaw (barry) wrote :

Agreed that for consistency, a 404 is a better error code. Thanks for the patch!

Changed in mailman:
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Barry Warsaw (barry)
milestone: none → 3.0.0a8
status: In Progress → Fix Committed
Barry Warsaw (barry)
Changed in mailman:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.