Skip to content

[Studio] Reject blank name and endpoint in instance updates #613

Description

@yx9o

Problem

POST /api/instances/update applies non-null name and endpoint values without checking whether they are blank.

An existing instance can therefore be saved with whitespace-only required fields, which is inconsistent with instance creation validation.

Expected behavior

  • Reject non-null blank instance names with HTTP 400.
  • Reject non-null blank instance endpoints with HTTP 400.
  • Leave the existing instance unchanged when validation fails.
  • Continue treating null fields as omitted fields during partial updates.
  • Preserve normal updates with valid values.

Proposed fix

Validate the supplied name and endpoint before modifying the existing instance, and add regression tests covering blank fields and mutation prevention.

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