Skip to content

Trying to delete a deleted object #397

@adrianhall

Description

@adrianhall

Discussed in #390

Originally posted by FrederikFBrandt July 14, 2025
If an object has already been deleted on the server, and the user deletes the same object locally - before synchronizing with the server - the synchronization fails and won't work unless I purge the user's local database. Does anyone know how to handle this more... elegantly?

Edit: This is what I currrently do in my tablecontroller:

        public override async Task<IActionResult> DeleteAsync([FromRoute] string id, CancellationToken cancellationToken = default)
        {
            try
            {
                return await base.DeleteAsync(id, cancellationToken);
            }
            catch (HttpException ex)
            {
                if(ex.StatusCode == 410)
                {
                    return NoContent();
                }
                return StatusCode(ex.StatusCode, ex.Message);
            }
        }
```</div>

Metadata

Metadata

Assignees

Labels

ClientImprovements or additions to the client code

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions