Skip to content

Tenancy Error Message when Delivery Service Already Exists outside of a user's tenancy #4150

Open
@ericholguin

Description

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:

Delivery Service with xmlId: test2 exists, belonging to a user with tenancy: -root
Login as another user with tenancy: --unassigned
POST request to https://{{TO_BASE_URL}}/api/{{api_version}}/deliveryservices with xmlId: test2 in the body.
Returns:

HTTP/1.1 403 Forbidden
Content-Type: application/json

{
    "alerts": [
        {
            "text": "not authorized on this tenant",
            "level": "error"
        }
    ]
}

Expected / new behavior:

Should Return

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

{
    "alerts": [
        {
            "text": "deliveryservice xml_id 'test2' already exists.",
            "level": "error"
        }
    ]
}

Minimal reproduction of the problem with instructions:

Anything else:

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic OpsimprovementThe functionality exists but it could be improved in some way.low impactaffects only a small portion of a CDN, and cannot itself break one

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions