You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Maxim Muzafarov (Jira)" <ji...@apache.org> on 2019/10/02 15:47:02 UTC
[jira] [Updated] (IGNITE-6750) Return "wrong command" error in http
rest api
[ 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"
> <no output here>
> 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)