Commit dd59217
authored
Handle unknown HTTP status response (#19)
As some responses don't have the matching status against the OpenAPI
spec, we need to set a default value to get the exact error message
instead of stacktrace like below:
** (MatchError) no match of right hand side value: nil
(open_api_typesense 0.6.1) lib/open_api_typesense/client.ex:172:
OpenApiTypesense.Client.parse_resp/21 parent fe3d03c commit dd59217
1 file changed
Lines changed: 10 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| |||
166 | 167 | | |
167 | 168 | | |
168 | 169 | | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
175 | 178 | | |
176 | | - | |
| 179 | + | |
177 | 180 | | |
178 | 181 | | |
179 | 182 | | |
| |||
0 commit comments