Skip to content

[High] POST /prospects returns 404 for emails previously handled via UI — misleading error with no recovery path #32

@loic2309

Description

@loic2309

Summary

Specific email addresses that were previously enrolled via the Overloop UI wizard return 404 "Couldn't find User without an ID" when attempting to create them via the public API. These emails do not appear anywhere in the prospects list, archived prospects, or search results — but they block creation.

Steps to Reproduce

# Email that was previously handled via UI wizard
curl -X POST \
  -H "Authorization: $OVERLOOP_API_KEY" \
  -H "Content-Type: application/vnd.api+json; charset=utf-8" \
  -d '{"data":{"type":"prospects","attributes":{"email":"contact@agency.com"}}}' \
  "https://api.overloop.ai/public/v1/prospects"
# Response: 404 {"errors":[{"code":"not_found","message":"Couldn't find User without an ID"}]}

Isolation Tests

For the affected email contact@agency.com:

Variant Result
other@agency.com (same domain) 201
contact@other-domain.com (same local part) 201
contact@agency.com (exact match) 404

The affected emails:

  • Do not appear in GET /prospects (any page)
  • Do not appear in GET /prospects?filter[archived]=true
  • Return 0 results from GET /prospects?search=contact@agency.com

Expected Behavior

The API should either:

  • Return 201 and create the prospect, or
  • Return 422 "has already been taken" if the email is already in the system (which is the response for emails that exist as active prospects)

Actual Behavior

404 with "Couldn't find User without an ID" — an internal Rails error that exposes implementation details and gives the caller no indication that the email is known to the system or how to recover.

Impact

Prospects enrolled via the UI wizard exist in an inaccessible state: they cannot be found via the API, cannot be updated, and cannot be recreated. There is no way to bring them under API management without Overloop support intervention.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions