code: def delete(self, id):
          
          try:
              response = yield self.client.delete(id)
  
              if response.get("n") > 0:
                  self.write({"message": "Deleted %s object: %s" % (self.object_name, id) })
                  return
  
              self.raise_error(404, "Resource not found")
  
          except InvalidId as ex:
              self.raise_error(400, message="Your ID is malformed: %s" % id)
          except:
              self.raise_error()
  
          self.finish()
docs: Delete a resource by bson id
          :raises: 404 Not Found
          :raises: 400 Bad request
          :raises: 500 Server Error