Skip to content

Commit 22fa74d

Browse files
Docs updated
1 parent 1d037be commit 22fa74d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,7 @@ content-type: application/problem+xml
385385
Used in `type`. Commonly used to set unique codes for different business error scenarios.
386386

387387

388-
## Problem Message resolvers
388+
## Message resolvers
389389
To know how to define the error attributes in properties file, enable debugging as follows.
390390
```properties
391391
problem.debug-enabled=true
@@ -496,7 +496,7 @@ throw Problems.newInstance("sample.problem")
496496
.defaultDetail("Default details if not found in properties file with parma1: {0} and param2: {1}")
497497
.detailArgs("P1", "P2")
498498
.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)
500500
```
501501
The above code snippet would throw unchecked exception, though not recommended but to throw checked exception,
502502
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.
513513
```java
514514
Problem problemOne = Problems.newInstance("sample.problem.one").get();
515515
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);
517517
```
518518

519519
`HttpStatus` can also be set over custom exception as follows, the same would reflect in error response and

0 commit comments

Comments
 (0)