diff --git a/pkg/controller/issueapi/handle_issue.go b/pkg/controller/issueapi/handle_issue.go index 1da9e8e44..e2d3d3558 100644 --- a/pkg/controller/issueapi/handle_issue.go +++ b/pkg/controller/issueapi/handle_issue.go @@ -123,6 +123,15 @@ func (c *Controller) decodeAndIssue(ctx context.Context, w http.ResponseWriter, case http.StatusOK: c.h.RenderJSON(w, http.StatusOK, res.IssueCodeResponse()) return + case http.StatusConflict: + // This only occurs on "user-report" types where the phone number collides with + // an already known one. In this case we just return "success" and don't + // actually do anything. This matches the other user-report code issue paths. + c.h.RenderJSON(w, http.StatusOK, &api.UserReportResponse{ + ExpiresAt: res.IssueCodeResponse().ExpiresAt, + ExpiresAtTimestamp: res.IssueCodeResponse().ExpiresAtTimestamp, + }) + return default: c.h.RenderJSON(w, res.HTTPCode, res.ErrorReturn) return