A developer is troubleshooting a Cisco RESTCONF API call that returns a 409 Conflict error. Which two scenarios could cause this? (Choose two.)
Trap 1: Authentication token is missing.
A missing authentication token yields 401 Unauthorized, not 409 Conflict. It is tempting because authentication failures are common RESTCONF issues, and it would be correct when credentials are absent or expired, but 409 signals a resource-state conflict such as a duplicate or concurrent edit.
Trap 2: The resource does not exist.
A missing resource yields 404 Not Found, because the URI path resolves to no existing target. It tempts because developers frequently hit absent paths when first testing RESTCONF, but that condition is reported as 404. A 409 Conflict instead signals a state clash, such as a duplicate create or a lock violation.
Trap 3: The request contains invalid data types.
Invalid data types produce a 400 Bad Request, since the server rejects malformed or wrongly typed payload values during schema validation. It tempts because YANG type mismatches are a common RESTCONF error, but they map to 400, not 409. A 409 arises from a state conflict, such as creating a resource that already exists.
- A
Authentication token is missing.
Why it fails: A missing authentication token yields 401 Unauthorized, not 409 Conflict. It is tempting because authentication failures are common RESTCONF issues, and it would be correct when credentials are absent or expired, but 409 signals a resource-state conflict such as a duplicate or concurrent edit.
- B
The resource's current state conflicts with the requested change (e.g., trying to delete a resource that is in use).
HTTP 409 means the request conflicts with the resource's current state. Attempting to delete a resource still in use, such as an object referenced by dependents, produces exactly this conflict because the server cannot reconcile the requested deletion with existing references.
- C
The resource already exists and the request attempts to create a duplicate.
A 409 arises when the request contradicts existing server state. Issuing a create for a resource that already exists duplicates a unique key, so the server rejects it as a conflict rather than overwriting or silently succeeding.
- D
The resource does not exist.
Why it fails: A missing resource yields 404 Not Found, because the URI path resolves to no existing target. It tempts because developers frequently hit absent paths when first testing RESTCONF, but that condition is reported as 404. A 409 Conflict instead signals a state clash, such as a duplicate create or a lock violation.
- E
The request contains invalid data types.
Why it fails: Invalid data types produce a 400 Bad Request, since the server rejects malformed or wrongly typed payload values during schema validation. It tempts because YANG type mismatches are a common RESTCONF error, but they map to 400, not 409. A 409 arises from a state conflict, such as creating a resource that already exists.