fixes #3515 - API handles not found objects with 404
(cherry picked from commit 46338cd73c542ecc3aa045b45e831434792c710e)
fixes #3515 - API handles not found objects with 404
(cherry picked from commit 46338cd73c542ecc3aa045b45e831434792c710e)