HTTP

HTTP 207 Multi-Status vs 409 Conflict

HTTP 207 (Multi-Status) is a 2xx Success response, while 409 (Conflict) is a 4xx Client Error response. 207 indicates that the response body contains status information for multiple resources, in situations where multiple status codes might be appropriate (WebDAV). In contrast, 409 means that the request conflicts with the current state of the server. Often due to concurrent modification or business rule violations.

Description

The response body contains status information for multiple resources, in situations where multiple status codes might be appropriate (WebDAV).

When You See It

In WebDAV operations that affect multiple resources simultaneously.

How to Fix

Parse the XML body to check the status of each individual resource.

Description

The request conflicts with the current state of the server. Often due to concurrent modification or business rule violations.

When You See It

When trying to create a resource that already exists, or updating a resource that was modified by another request.

How to Fix

Refresh the resource state, resolve conflicts, and retry. Use ETags for optimistic concurrency.

Key Differences

1.

207 is a 2xx Success response, while 409 is a 4xx Client Error response.

2.

HTTP 207: The response body contains status information for multiple resources, in situations where multiple status codes might be appropriate (WebDAV).

3.

HTTP 409: The request conflicts with the current state of the server. Often due to concurrent modification or business rule violations.

4.

You encounter 207 when in WebDAV operations that affect multiple resources simultaneously.

5.

You encounter 409 when when trying to create a resource that already exists, or updating a resource that was modified by another request.

When to Use Which

For 207 (Multi-Status): Parse the XML body to check the status of each individual resource. For 409 (Conflict): Refresh the resource state, resolve conflicts, and retry. Use ETags for optimistic concurrency.

Learn More