Skip to content

bug: POST /api/platform/v1/mentees returns 500 when an existing mentee resubmits without profileStatus in the body #705

@nora-weisser

Description

@nora-weisser

Problem

On the update path (existing mentee, looked up by email), the service calls ProfileStatus.getStatusId() on the request's profileStatus field. The mentee form on the website don't send this field, so on any second submission or the submission from the mentee who participate in long-term for the same email the call dereferences null and the request fails with a generic 500 Internal Server Error.

Evidence

Second POST /mentees against the same email, without profileStatus:

{
  "timestamp": "...",
  "status": 500,
  "error": "Internal Server Error",
  "path": "/api/platform/v1/mentees"
}

Server log:

java.lang.NullPointerException: Cannot invoke
  "com.wcc.platform.domain.platform.member.ProfileStatus.getStatusId()"
  because "profileStatus" is null

Adding "profileStatus": "PENDING" to the body lets the same request succeed (201).

Metadata

Metadata

Assignees

No one assigned

    Labels

    ad-hocbugSomething isn't workingepic-mentorshipAll tasks related to mentorship pages & tasksjava/springbootTasks where is needed Java experience or Spring Boot Experience

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions