Skip to content

Support a way to differentiate deletes where the item existed or did not exist #29

@SeriousBug

Description

@SeriousBug

When performing deletes, it is useful to be able to differentiate between "this item existed and was deleted" and "this did not exist, and there was nothing to delete". For example, a RESTful DELETE endpoint can return a 404 or 200 based on whether the item already existed or not.

Right now the only way to differentiate between the two is to first perform a lookup then delete, which is not even necessarily accurate since there can be a data race between the two operations.

A better way to do this might be to use the attribute_exists condition with the PK attribute to make the delete fail if the item does not exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions