java - How to return a 400 status code, but return an int -
i want instead of null pointer exception in java method return new responseentity<string>(httpstatus.bad_request); method returns int not string. main thing want return 400 status code. can do?
i tried throw new illegalargumentexception(arg + "is not valid argument; positive value expected"); returns 500 status code message. i'm doing on web service if helps.
i tried return new responseentity<integer>(httpstatus.bad_request);, doesn't seem work either.
Comments
Post a Comment