Skip to content

412 PRECONDITION FAILED when _etag is correct #1465

@xibriz

Description

@xibriz

Expected Behavior: 204 NO CONTENT

Actual Behavior: 412 PRECONDITION FAILED

If SOFT_DELETE is set to True on a global level and an endpoint is defined without a schema, it becomes impossible to delete.

Example endpoint:

my_endpoint = {
    'cache_control': 'no-store',
    'resource_methods': ['GET', 'POST'],
    'item_methods': ['DELETE'],
    'allow_unknown': True,
    'schema': {}
}

I found two work arounds:

  1. Add 'soft_delete': False to the configuration
  2. Set 'allow_unknown': False and define a schema

Either the response should be someting else becase the _etag is correct or the bug should be fixed.

Environment

  • Python version: 3.8.10
  • Eve version: 1.1.5

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