Commit 5c02d94
Fix: Extract non-JSON error body (#33)
Before:
When the inference service returns a non-JSON response, the actual error
is masked by a parsing failure.
```text
Caused by: java.lang.IllegalArgumentException: Could not process JSON error object
Caused by: com.fasterxml.jackson.core.JsonParseException:
Unrecognized token 'dial'
```
After:
The original error is preserved.
```text
Caused by: com.bakdata.kserve.client.InferenceRequestException:
Inference request failed: 502:
dial tcp 127.0.0.1:8080: connect: connection refused
```
---------
Co-authored-by: Philipp Schirmer <philipp.schirmer@bakdata.com>1 parent 72e8705 commit 5c02d94
File tree
2 files changed
+30
-1
lines changed- src
- main/java/com/bakdata/kserve/client
- test/java/com/bakdata/kserve/client
2 files changed
+30
-1
lines changedLines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
140 | 168 | | |
141 | 169 | | |
142 | 170 | | |
| |||
0 commit comments