Skip to content

Commit d046a08

Browse files
author
Fernando Saint-Jean
committed
inserts documentation change requested in #8
1 parent 0bf4a75 commit d046a08

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,11 @@ class ComplexPojoException extends Exception {
131131

132132
@FeignExceptionConstructor
133133
public ComplexPojoException(GithubExceptionResponse body) {
134-
134+
if (body != null) {
135+
// extract data
136+
} else {
137+
// fallback code
138+
}
135139
}
136140
}
137141
//The pojo can then be anything you'd like provided the decoder can manage it
@@ -141,3 +145,6 @@ class GithubExceptionResponse {
141145
public List<String> urlsForHelp;
142146
}
143147
```
148+
149+
It's worth noting that at setup/startup time, the generators are checked with a null value of the body.
150+
If you don't do the null-checker, you'll get an NPE and startup will fail.

0 commit comments

Comments
 (0)