I'm running into the issue of having to differentiate between two error cases which both throw a Java BadrequestException, which shows up as having a 400 error code. I've extended BadrequestException to create a CustomException, but this Exception also throws a 400. Is there a way to have a custom exception throw an "unassigned" error code, like 469, for example? And how would I go about doing that?
-
1We have no idea of which framework you're using. There are many, many of them. So, find out what you're using, then read the documentation of the framework. It probably contains the information.JB Nizet– JB Nizet2018-03-28 18:51:26 +00:00Commented Mar 28, 2018 at 18:51
-
Framework as in angularjs?P_equals_NP_2021– P_equals_NP_20212018-03-28 18:54:45 +00:00Commented Mar 28, 2018 at 18:54
-
No. AngularJS is a JavaScript framework, used at client-side. You're using a Java framework, at server-side.JB Nizet– JB Nizet2018-03-28 18:55:44 +00:00Commented Mar 28, 2018 at 18:55
-
Ohh sorry. We're using Maven.P_equals_NP_2021– P_equals_NP_20212018-03-28 18:58:23 +00:00Commented Mar 28, 2018 at 18:58
-
Yeah, but that is completely irrelevant. Maven is a build tool. Not a Java web framework. If nobody in your team is able to even name the framework you chose to implement your app, how can you even work? Do you guys never read any documentation?JB Nizet– JB Nizet2018-03-28 19:11:18 +00:00Commented Mar 28, 2018 at 19:11
|
Show 1 more comment