Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Issues when updating a user's email using /user/current endpoint #4239

Description

@ericholguin

I'm submitting a ...

  • bug report
  • new feature / enhancement request
  • improvement request (usability, performance, tech debt, etc.)
  • other

Traffic Control components affected ...

  • CDN in a Box
  • Documentation
  • Grove
  • Traffic Control Client
  • Traffic Monitor
  • Traffic Ops
  • Traffic Ops ORT
  • Traffic Portal
  • Traffic Router
  • Traffic Stats
  • Traffic Vault
  • unknown

Current behavior:

When making a PUT request to /user/current with the following request body:

{
    "user": {
        "email": ""
    }
}

Will return:

HTTP/1.1 200 OK
Content-Type: application/json

{
    "alerts": [
        {
            "text": "User profile was successfully updated",
            "level": "success"
        }
    ],
    "response": {
        .
        .
        "email": "",
        .
    }
}

And when making a PUT request to /user/current/ with the following request body:

{
    "user": {
        "email": null
    }
}

Will return

HTTP/1.1 500 Internal Server Error
Content-Type: application/json

{
    "alerts": [
        {
            "text": "Internal Server Error",
            "level": "error"
        }
    ]
}

Expected / new behavior:

Both requests should return:

HTTP/1.1 400 Bad Request
Content-Type: application/json

{
    "alerts": [
        {
            "text": "Couldn't parse request: email: cannot be null or empty string",
            "level": "error"
        }
    ]
}

Minimal reproduction of the problem with instructions:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic Opsbugsomething isn't working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions