from json import dumps from flask import Response from flask_api import status from protocol.errors_pb2 import * class ErrorResponse(Response): def __init__(self, err_code, err_msg=''): result = dumps(dict(code=err_code, msg=err_msg)) Response.__init