Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 33C2E200C5B for ; Thu, 13 Apr 2017 06:45:47 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 32867160BA8; Thu, 13 Apr 2017 04:45:47 +0000 (UTC) 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 7A68C160B95 for ; Thu, 13 Apr 2017 06:45:46 +0200 (CEST) Received: (qmail 64796 invoked by uid 500); 13 Apr 2017 04:45:45 -0000 Mailing-List: contact dev-help@atlas.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@atlas.incubator.apache.org Delivered-To: mailing list dev@atlas.incubator.apache.org Received: (qmail 64785 invoked by uid 99); 13 Apr 2017 04:45:45 -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; Thu, 13 Apr 2017 04:45:45 +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 26359CAA32 for ; Thu, 13 Apr 2017 04:45:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id MDf7v1qok3It for ; Thu, 13 Apr 2017 04:45:44 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id A042561F89 for ; Thu, 13 Apr 2017 04:45:43 +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 1511CE0059 for ; Thu, 13 Apr 2017 04:45:43 +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 E391424073 for ; Thu, 13 Apr 2017 04:45:41 +0000 (UTC) Date: Thu, 13 Apr 2017 04:45:41 +0000 (UTC) From: "Apoorv Naik (JIRA)" To: dev@atlas.incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (ATLAS-1708) Incorrect error code while querying an entity for tag for which tag association is removed. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Thu, 13 Apr 2017 04:45:47 -0000 [ https://issues.apache.org/jira/browse/ATLAS-1708?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15967127#comment-15967127 ] Apoorv Naik commented on ATLAS-1708: ------------------------------------ Can you add this condition to Line 302 in EntityGraphRetriever ? {code} if (CollectionUtils.isEmpty(classificationNames) || StringUtils.isNotEmpty(classificationNameFilter)) { //Should not reach here if classification present throw new AtlasBaseException(AtlasErrorCode.CLASSIFICATION_NOT_FOUND, classificationNameFilter); } {code} > Incorrect error code while querying an entity for tag for which tag association is removed. > ------------------------------------------------------------------------------------------- > > Key: ATLAS-1708 > URL: https://issues.apache.org/jira/browse/ATLAS-1708 > Project: Atlas > Issue Type: Bug > Components: atlas-core > Affects Versions: trunk, 0.9-incubating > Reporter: Sharmadha Sainath > Assignee: Sarath Subramanian > Attachments: ATLAS-1708.1.patch, EntityTagException.txt > > > 1. Associated a tag PII to an entity. > 2. /api/atlas/v2/entity/guid/{guid}/classification/PII GET query returned 200 OK. > 3. Removed the PII tag from the entity. > 4. /api/atlas/v2/entity/guid/{guid}/classification/PII GET query returned 500 Internal Server error. It should return 404 ideally. > Attached the exception stack trace from application logs when GET query is fired. > Note : When a tag is not associated to the entity at all, and when the same GET request is made with that tag name , 404 is returned. > For example , Tag Personal is not associated to the entity and the same GET request with tag Personal returns 404 . *Only when a tag is associated and disassociated from an entity, GET request throws 500 internal server * -- This message was sent by Atlassian JIRA (v6.3.15#6346)