Skip to content

Commit 3fcba0d

Browse files
Docs updated
1 parent 3d17bb6 commit 3fcba0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ depending on the jars in classpath of consumer application.
4848
**Even for exceptions for which no advices are defined**, respective error response can be specified by
4949
messages in `properties` file, elaborated in [*Usage*](https://github.com/officiallysingh/spring-boot-problem-handler#usage) section.
5050
New custom advices could be required only in cases where it is required to take some data from exception instance
51-
to dynamically derive **Error key** (Elaborated later)
51+
to dynamically derive [*Error key*](https://github.com/officiallysingh/spring-boot-problem-handler#error-key)
5252
or to use this data to resolve any placeholders in error message. In such cases consumer application can define
5353
their own custom `ControllerAdvice`'s,
5454
Any existing advice can be referred to weave the custom advice into the framework.
@@ -327,7 +327,7 @@ problem.open-api.res-validation-enabled=false
327327
## Usage
328328

329329
### Error Key
330-
The main concept behind specifying the error attributes in `properties` file is **Error key**, which is mandatory to be unique for each error scenario.
330+
The main concept behind specifying the error attributes in `properties` file is [*Error key*](https://github.com/officiallysingh/spring-boot-problem-handler#error-key), which is mandatory to be unique for each error scenario.
331331
**It is either derived or specified by application** while throwing exception and used to externalize the error attributes in `properties` file.
332332

333333
For example if error key for some exception is `some.error.key`, then error response attributes can be specified in `properties` file as follows.
@@ -437,7 +437,7 @@ For example in case of `ConstraintViolationException` `codes` would be multiple
437437
Respective codes for corresponding attribute can be copied and message can be specified for same in `properties` file.
438438

439439
> [!NOTE]
440-
> `org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException` i.e. fully qualified name of exception is the **Error key** in above case.
440+
> `org.springframework.batch.core.repository.JobInstanceAlreadyCompleteException` i.e. fully qualified name of exception is the [*Error key*](https://github.com/officiallysingh/spring-boot-problem-handler#error-key) in above case.
441441
**This scenario also covers all the exceptions for which advices are not defined**.
442442
But additionally `HttpStatus` need to be specified in `properties` file as it has not been specified anywhere in code because `ControllerAdvice` is not defined,
443443
if status not given even in `properties` file `HttpStatus.INTERNAL_SERVER_ERROR` is taken as default.
@@ -475,7 +475,7 @@ The simplistic way is to just specify a unique error key and `HttpStatus`.
475475
throw Problems.newInstance("sample.problem").throwAble(HttpStatus.EXPECTATION_FAILED);
476476
```
477477
Error response attributes `code`, `title` and `detail` are expected from the message source (`properties` file) available as follows.
478-
Notice the Error key **sample.problem** in following properties
478+
Notice the [*Error key*](https://github.com/officiallysingh/spring-boot-problem-handler#error-key) **sample.problem** in following properties
479479

480480
```properties
481481
code.sample.problem=AYX123

0 commit comments

Comments
 (0)