Fixed a bug when adding object: 201 status code was considered as an error