GetDutchie / brick

An intuitive way to work with persistent data in Dart

Home Page:https://getdutchie.github.io/brick/#/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deleting a document that has already been deleted from the server causes an error

hortigado opened this issue · comments

Hello, when deleting a document that for various reasons has been deleted from the server, it generates a loop. I think the solution that should be given is that if the request to the server throws a document not found error; synchronization to the server is canceled

image

@hortigado That's a good bug report. To confirm, reproduction steps:

  1. Delete a document that does not exist on the server
  2. Experience not found loop

Is that accurate?

@tshedor Correct, also if you want to update the document and it does not exist on the server it causes the same problem.

  /// If the response returned from the client is one of these error codes, the request
  /// **will not** be removed from the queue. For example, if the result of a request produces a
  /// 404 status code response (such as in a Tunnel not found exception), the request will
  /// be reattempted.
  ///
  /// Defaults to `[404, 501, 502, 503, 504]`.
  final List<int> reattemptForStatusCodes;

I only delete the error 404 of reattemptForStatusCodes and solved it problem. Regards