> On Feb. 23, 2016, 1:25 a.m., Colin Ma wrote: > > server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java, > > line 145 > > <https://reviews.apache.org/r/43857/diff/1/?file=1264870#file1264870line145> > > > > Is this for the authorization failed when request the /debug/* ?
Good question, I should have describe why I'm doing this change in the description. When I issue POST to my/cool/endpoint, then as this endpoint doesn't exists at all, it's handled by Jetty and Jetty returns 405. However if I execute POST to v1/connector (existing endpoint), then our code will return 500. I wanted to be consistent in handling that scenario and I've decided to change the 500 to 405 as I believe that it's better describing what's happening. Calling non existing endpoint is not really a "500 internal server error", it's a request error. - Jarek ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/43857/#review120234 ----------------------------------------------------------- On Feb. 23, 2016, 12:14 a.m., Jarek Cecho wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/43857/ > ----------------------------------------------------------- > > (Updated Feb. 23, 2016, 12:14 a.m.) > > > Review request for Sqoop and Jarek Cecho. > > > Bugs: SQOOP-2545 > https://issues.apache.org/jira/browse/SQOOP-2545 > > > Repository: sqoop-sqoop2 > > > Description > ------- > > I would like to see (&test) what happens when I call some random non-existing > REST URLs to our server. > > > Diffs > ----- > > server/src/main/java/org/apache/sqoop/handler/SubmissionRequestHandler.java > b894e37 > server/src/main/java/org/apache/sqoop/server/SqoopProtocolServlet.java > fb4a99f > > test/src/test/java/org/apache/sqoop/integration/server/rest/NonExistingRestTest.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/43857/diff/ > > > Testing > ------- > > > Thanks, > > Jarek Cecho > >
