def _compose_error_response(self, req, resp, error):

        resp.status = error.status

        if error.headers is not None:
            resp.set_headers(error.headers)

        if error.has_representation:
            self._serialize_error(req, resp, error)
Composes a response for the given HTTPError instance.
dataset/ETHPy150Open falconry/falcon/falcon/api.py/API._compose_error_response