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.
Problem
POST /api/instances/updateapplies non-nullnameandendpointvalues 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
Proposed fix
Validate the supplied name and endpoint before modifying the existing instance, and add regression tests covering blank fields and mutation prevention.