Project

General

Profile

Actions

Feature #119

open

API - don't return 200 when attempting to modify unchangeable attributes

Added by Sam Pearson 6 months ago. Updated 23 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
01/13/2026
Due date:
% Done:

0%

Estimated time:
Engineering Effort:
App Component:
API
Feature:

Description

If you try to hit an update endpoint like this:

{{protocol}}://{{host}}:{{port}}/api/tasks/{{task_id}}

With a body that includes an updated attribute which you can't change, like "completed",

you'll get a 200 response including with a body indicating that the API updated what it could but the protected field won't be changed.

Instead, you should get a different http code and you should be notified that the request was malformed.

Actions #1

Updated by Sam Pearson 3 months ago ยท Edited

It may be useful to decide whether idempotency is something we want and/or if "idempotent consistency" is worth chasing.

sometimes idempotency feels bad and wrong, like when you try to connect things that are already connected or disconnect things that are already disconnected

it smells bad. You're getting feedback that you've arrived at the state you wanted, but the path you took there may have been a circle. It feels like smashing ctrl+c fifteen times to make sure it actually copied.

But like many engineering decisions, consistency is probably more important than making the right call.

Actions #2

Updated by Sam Pearson 23 days ago

  • App Component set to API

More of a design issue, it's unclear what to do when the user tries to execute an update request with some valid and some invalid attributes.

Actions

Also available in: Atom PDF