First of all get object return error (" 404 ") in every-case. Second algolia get object should return whole object which is created in database not an error. These changes I will recommended. I will create a algolia-wrapper and add few modification if your team like.
Algolia-wrapper