Exemple #1
0
def error_dict(code: PoolErrorCode, message: str):
    error: ErrorResponse = ErrorResponse(uint16(code.value), message)
    return error.to_json_dict()
Exemple #2
0
def error_response(code: PoolErrorCode, message: str):
    error: ErrorResponse = ErrorResponse(uint16(code.value), message)
    return obj_to_response(error)
Exemple #3
0
 def handle_failed_pool_response(self, p2_singleton_puzzle_hash: bytes32, error_message: str):
     self.log.error(error_message)
     self.pool_state[p2_singleton_puzzle_hash]["pool_errors_24h"].append(
         ErrorResponse(uint16(PoolErrorCode.REQUEST_FAILED.value), error_message).to_json_dict()
     )