Open abubkr-hago opened 2 months ago
Could you provide more details in your example use case? Specifically:
the server replies with the same object creation response instead of creating a new one.
I have an android app where I am creating a Post
ParseObject, but when connection issues arise creating a post can sometimes return with the error code 159
. And then the app will have to figure out how to query this newly crerated post.
I think caching the response server side on the same _Idempotency collection for the same amount of time the ttl is set in the idempotencyOptions configuration... might solve this issue.
Got it. This has been discussed in the design of this feature, see https://github.com/parse-community/parse-server/pull/6748#issuecomment-657918836 and https://github.com/parse-community/parse-server/pull/6748#issuecomment-658087261. Maybe @mrmarcsmith would be interested to join this discussion here to find a concept for returning cached responses.
New Feature / Enhancement Checklist
Current Limitation
Idempotent requests are now rejected with a
159
code error,Feature / Enhancement Description
Instead of rejecting with an error, maybe there is a way to cache the response and respond with it on the next request?.
Example Use Case
A client SDK creates a
Test
ParseObject but doesn't recieve the response because of a network issue, the SDK tries to create the object again with the sameX-Parse-Request-Id
header, the server replies with the same object creation response instead of creating a new one.Alternatives / Workarounds
N/A
3rd Party References
N/A