From issues-return-99620-archive-asf-public=cust-asf.ponee.io@ignite.apache.org Wed Oct 2 15:47:13 2019 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 8CA4E180675 for ; Wed, 2 Oct 2019 17:47:12 +0200 (CEST) Received: (qmail 85419 invoked by uid 500); 2 Oct 2019 15:47:07 -0000 Mailing-List: contact issues-help@ignite.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ignite.apache.org Delivered-To: mailing list issues@ignite.apache.org Received: (qmail 85057 invoked by uid 99); 2 Oct 2019 15:47:06 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Oct 2019 15:47:06 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 39274E317F for ; Wed, 2 Oct 2019 15:47:05 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 4F5EC782309 for ; Wed, 2 Oct 2019 15:47:02 +0000 (UTC) Date: Wed, 2 Oct 2019 15:47:02 +0000 (UTC) From: "Maxim Muzafarov (Jira)" To: issues@ignite.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (IGNITE-6750) Return "wrong command" error in http rest api MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/IGNITE-6750?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Maxim Muzafarov updated IGNITE-6750: ------------------------------------ Fix Version/s: (was: 2.8) > Return "wrong command" error in http rest api > --------------------------------------------- > > Key: IGNITE-6750 > URL: https://issues.apache.org/jira/browse/IGNITE-6750 > Project: Ignite > Issue Type: Bug > Components: general > Affects Versions: 1.9, 2.0, 2.1, 2.2 > Reporter: Alexander Belyak > Priority: Minor > > If I make mistake in command name, for example > curl "http://localhost:8080/ignite?cmd=wrongcmd" > > I get no error message and nothing will be logged in ignite log (even in IGNITE_QUIET=false mode) and only by getting response code > curl -I "http://localhost:8080/ignite?cmd=wrongcmd" > HTTP/1.1 400 Bad Request > Date: Wed, 25 Oct 2017 10:03:06 GMT > Content-Type: application/json; charset=UTF-8 > Content-Length: 0 > Server: Jetty(9.2.11.v20150529) > I can see something, but without root cause. > We need: > 1) return error text > curl "http://localhost:8080/ignite?cmd=wrongcmd" > {"successStatus":1,"sessionToken":null,"error":"Failed to handle request: [req=UNKNOWN, err=Failed to find command: wrongcmd]","response":null} > as usual: > curl "http://localhost:8080/ignite?cmd=get" > {"successStatus":1,"sessionToken":null,"error":"Failed to handle request: [req=CACHE_GET, err=Failed to find mandatory parameter in request: key]","response":null} > 2) set status code in http response to 400 ( http://www.restapitutorial.com/httpstatuscodes.html ) -- This message was sent by Atlassian Jira (v8.3.4#803005)