def __createErrorResponse(self,request,code,message):
        return Response(code=code, entity=message, headers={"content-type": MediaType.TEXT_PLAIN})
Common method for rendering errors
dataset/ETHPy150Open jacek99/corepost/corepost/routing.py/RequestRouter.__createErrorResponse