3 ms·
I've worked on fintech as well. All of my full time jobs have dealt with both idempotency and API error code issues across both trading fintech as well as consu
by no_circuit 5y ago
I've worked on fintech as well. All of my full time jobs have dealt with both idempotency and API error code issues across both trading fintech as well as consumer social apps. App-level error codes, which includes idempotency, seem to be best handled in app request bodies, not the enveloping protocol layer.
In trading fintech there is the FIX API [0] which has been around for a while. It has a "Client Order Id" field which gets mapped to an (Exchange) "Order Id" field.
I've also worked on the Twitter apps. The API spec seems fairly clean [1], but at least when I was there some time ago, there were edge cases that both the HTTP error and app error codes had to be combined to find the true error in order to take the correct action and show an appropriate error message to the user.
Idempotency is a very app-specific error condition. So I'm definitely in the group of developers that would not want to see nor code for app errors at a transport like HTTP level. I feel that the header idea and spec has good intentions, but does not take into consideration the developer experience as an API grows more complex. It also forces changes at the app messaging level if one wants to support different transport types (UDP unicast or multicast, gRPC [2], etc.).
[0] https://en.wikipedia.org/wiki/Financial_Information_eXchange https://en.wikipedia.org/wiki/Financial_Information_eXchange
[1] https://developer.twitter.com/en/support/twitter-api/error-troubleshooting https://developer.twitter.com/en/support/twitter-api/error-t...
[2] https://grpc.github.io/grpc/core/md_doc_statuscodes.html https://grpc.github.io/grpc/core/md_doc_statuscodes.html