@@ -385,7 +385,7 @@ content-type: application/problem+xml
385
385
Used in ` type ` . Commonly used to set unique codes for different business error scenarios.
386
386
387
387
388
- ## Problem Message resolvers
388
+ ## Message resolvers
389
389
To know how to define the error attributes in properties file, enable debugging as follows.
390
390
``` properties
391
391
problem.debug-enabled =true
@@ -496,7 +496,7 @@ throw Problems.newInstance("sample.problem")
496
496
.defaultDetail(" Default details if not found in properties file with parma1: {0} and param2: {1}" )
497
497
.detailArgs(" P1" , " P2" )
498
498
.cause(new IllegalStateException (" Artificially induced illegal state" ))
499
- .throwAble(Status . EXPECTATION_FAILED ); // .throwAbleChecked(Status .EXPECTATION_FAILED)
499
+ .throwAble(HttpStatus . EXPECTATION_FAILED ); // .throwAbleChecked(HttpStatus .EXPECTATION_FAILED)
500
500
```
501
501
The above code snippet would throw unchecked exception, though not recommended but to throw checked exception,
502
502
use ` throwAbleChecked ` as terminal operation as highlighted in java comment above.
@@ -513,7 +513,7 @@ Or to throw multiple exceptions together.That can be done as follows.
513
513
``` java
514
514
Problem problemOne = Problems . newInstance(" sample.problem.one" ). get();
515
515
Problem problemTwo = Problems . newInstance(" sample.problem.two" ). get();
516
- throw Problems . throwAble(Status . MULTI_STATUS , problemOne, problemTwo);
516
+ throw Problems . throwAble(HttpStatus . MULTI_STATUS , problemOne, problemTwo);
517
517
```
518
518
519
519
` HttpStatus ` can also be set over custom exception as follows, the same would reflect in error response and
0 commit comments