Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 707C9160C38 for ; Wed, 3 Jan 2018 03:48:06 +0100 (CET) Received: (qmail 42501 invoked by uid 500); 3 Jan 2018 02:48:05 -0000 Mailing-List: contact issues-help@kylin.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kylin.apache.org Delivered-To: mailing list issues@kylin.apache.org Received: (qmail 42489 invoked by uid 99); 3 Jan 2018 02:48:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jan 2018 02:48:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id A33CDC35C9 for ; Wed, 3 Jan 2018 02:48:04 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -100.011 X-Spam-Level: X-Spam-Status: No, score=-100.011 tagged_above=-999 required=6.31 tests=[RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id bJ8MT3UggLPf for ; Wed, 3 Jan 2018 02:48:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 71F685FBC5 for ; Wed, 3 Jan 2018 02:48:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id A8AFEE0DE3 for ; Wed, 3 Jan 2018 02:48:01 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 33C69240F6 for ; Wed, 3 Jan 2018 02:48:00 +0000 (UTC) Date: Wed, 3 Jan 2018 02:48:00 +0000 (UTC) From: " Kaige Liu (JIRA)" To: issues@kylin.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Created] (KYLIN-3147) Response code and exception should be standardised for cube checking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 03 Jan 2018 02:48:07 -0000 Kaige Liu created KYLIN-3147: --------------------------------- Summary: Response code and exception should be standardised for cube checking Key: KYLIN-3147 URL: https://issues.apache.org/jira/browse/KYLIN-3147 Project: Kylin Issue Type: Improvement Reporter: Kaige Liu Assignee: Kaige Liu Priority: Minor Checking if cubes exist or not is a common behaviour in some APIs. But we have lots of different responses for the same behaviour. Let's take CubeController as an example. When can not find a cube with its name, someone gives a *400* as response code, someone returns *404*, and others send back a *500*. Not only HTTP response code is not standard, which kind of exception should be thrown is not unified as well. Still using the above example, we can find *IllegalArgumentException*, *BadRequestException*, *InternalErrorException*. -- This message was sent by Atlassian JIRA (v6.4.14#64029)