Skip to content

Commit a04c3fc

Browse files
updated
1 parent b2098c7 commit a04c3fc

File tree

1 file changed

+27
-3
lines changed

1 file changed

+27
-3
lines changed

README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,30 @@ Requires Java 21, Spring boot 3.2.0+ and Jakarta EE 10
66

77
![Exception Handling](https://miro.medium.com/v2/resize:fit:1400/format:webp/1*0s2E6-iNFqr_xptwrmJTdg.jpeg)
88

9+
## Table of Contents
10+
1 [Introduction](https://github.com/officiallysingh/spring-boot-problem-handler#introduction)
11+
2 [Installation](https://github.com/officiallysingh/spring-boot-problem-handler#installation)
12+
3 [Features](https://github.com/officiallysingh/spring-boot-problem-handler#features)
13+
4 [Controller Advices](https://github.com/officiallysingh/spring-boot-problem-handler#controller-advices)
14+
- [General advices](https://github.com/officiallysingh/spring-boot-problem-handler#general-advices-recommended-for-all-spring-rest-services)
15+
- [DAO advices](https://github.com/officiallysingh/spring-boot-problem-handler#dao-advices)
16+
- [Security advices](https://github.com/officiallysingh/spring-boot-problem-handler#security-advices)
17+
- [OpenAPI validation advice](https://github.com/officiallysingh/spring-boot-problem-handler#openapi-validation-advice)
18+
5 [Configurations]()(https://github.com/officiallysingh/spring-boot-problem-handler#configurations)
19+
6 [Problem Properties](https://github.com/officiallysingh/spring-boot-problem-handler#problem-properties)
20+
7 [Error Key](https://github.com/officiallysingh/spring-boot-problem-handler#error-key)
21+
8 [Error response](https://github.com/officiallysingh/spring-boot-problem-handler#error-response)
22+
9 [Message resolvers](https://github.com/officiallysingh/spring-boot-problem-handler#message-resolvers)
23+
10 [Creating and throwing exceptions](https://github.com/officiallysingh/spring-boot-problem-handler#creating-and-throwing-exceptions)
24+
11 [Stack traces](https://github.com/officiallysingh/spring-boot-problem-handler#stack-traces)
25+
12 [Cause chains](https://github.com/officiallysingh/spring-boot-problem-handler#cause-chains)
26+
13 [Customizations](https://github.com/officiallysingh/spring-boot-problem-handler#customizations)
27+
- [Customize error response](https://github.com/officiallysingh/spring-boot-problem-handler#customize-error-response)
28+
- [Customize or Override advices](https://github.com/officiallysingh/spring-boot-problem-handler#customize-or-override-advices)
29+
14 [Define new advices](https://github.com/officiallysingh/spring-boot-problem-handler#define-new-advices)
30+
15 [Testing](https://github.com/officiallysingh/spring-boot-problem-handler#testing)
31+
16 [Example error responses](https://github.com/officiallysingh/spring-boot-problem-handler#example-error-responses)
32+
933
## Introduction
1034

1135
Exception handling is a cross-cutting concern, should be kept separate from business logic and applied declaratively.
@@ -124,9 +148,9 @@ or [**`ProblemHandlingWebflux`**](src/main/java/com/ksoot/problem/spring/advice/
124148
| `└──`[ `ApplicationAdviceTraits`](src/main/java/com/ksoot/problem/spring/advice/application/ApplicationAdviceTraits.java) | `└──`[`ApplicationAdviceTraits`](src/main/java/com/ksoot/problem/spring/advice/application/ApplicationAdviceTraits.java) |
125149

126150

127-
#### Dao advices
151+
#### DAO advices
128152

129-
| Dao Advice Traits | Produces | Error Key |
153+
| DAO Advice Traits | Produces | Error Key |
130154
|------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------|--------------------------------------------------------|
131155
| [**`DaoAdviceTraits`**](src/main/java/com/ksoot/problem/spring/advice/dao/DaoAdviceTraits.java) | | |
132156
| `├──`[**`DataIntegrityViolationAdviceTrait`**](src/main/java/com/ksoot/problem/spring/advice/dao/DataIntegrityViolationAdviceTrait.java) | [`500 Internal Server Error`](https://httpstatus.es/500) | data.integrity.violation.\<Failed DB constraint name\> |
@@ -880,7 +904,7 @@ public class WebFluxTestConfiguration {
880904
}
881905
```
882906

883-
## Examples responses
907+
## Example error responses
884908
**Following are example error responses in different scenarios.**
885909
The error response attributes `code`, `title` and `detail` can be customized for each error by specifying
886910
the same in `errors.properties` file for different error keys which you can get by setting `problem.debug-enabled=true` in `application.properties` file

0 commit comments

Comments
 (0)