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.

Blank fields incorrectly returns 200 OK when POSTing #3097

@moltzaum

Description

@moltzaum

curl -Lvsk --cookie $mc -XPOST https://localhost:6443/api/1.2/cdns -d @cdn.json
< HTTP/1.1 200 OK
{"alerts":[{"text":"'name' cannot be blank","level":"error"}]}

The same happens for profiles, and I presume other endpoints as well.

shared_handlers.go:320 looks like it takes the validate errors and returns http.StatusBadRequest, which makes me a little confused. This bug causes the profiles api test to fail when it posts a "bad profile" (one without required fields).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions