mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Tighten check for reply to address conflict error
The check was made more permissive temporarily as we were changing error code we are returning form API from 400 to 409.
This commit is contained in:
@@ -391,7 +391,7 @@ def service_add_email_reply_to(service_id):
|
||||
service_id, form.email_address.data
|
||||
)["data"]["id"]
|
||||
except HTTPError as e:
|
||||
if e.status_code == 409 or e.status_code == 400:
|
||||
if e.status_code == 409:
|
||||
flash(e.message, 'error')
|
||||
return redirect(url_for('.service_email_reply_to', service_id=service_id))
|
||||
else:
|
||||
@@ -518,7 +518,7 @@ def service_edit_email_reply_to(service_id, reply_to_email_id):
|
||||
service_id, form.email_address.data
|
||||
)["data"]["id"]
|
||||
except HTTPError as e:
|
||||
if e.status_code == 400 or e.status_code == 409:
|
||||
if e.status_code == 409:
|
||||
flash(e.message, 'error')
|
||||
return redirect(url_for('.service_email_reply_to', service_id=service_id))
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user