The full element should be returned after its creation through the API

Bastien Abadie
2020-06-25T12:15:27Z

The element creation is partly broken in prod due to the frontend making 2 requests for the creation of an element:

1. the POST on /api/v1/elements/create is always successful, hits the master DB server

2. the GET on /api/v1/element/<uuid> may give a 404 because the DB replica did not get the element in the replication (it usually takes a few ms but can take several seconds).

The best solution would be to send the full element serialized after an element is created (which could be useful in other areas).

The fast & dirty solution is to retry 2 times loading the element in the frontend.