Commit 590b5d0
authored
HTTP/TS: Fix response type checks throwing on certain inputs (#788)
## Usage and product changes
In the HTTP/TS driver, `isApiErrorResponse` and `isOkResponse` should
never throw errors anymore for any input.
## Motivation
Although their input is theoretically restricted, in practice errors in
TypeScript usually have the `any` type when they're thrown from HTTP
libraries such as `fetch`.
## Implementation
Check that the input is actually an object before scanning it1 parent d89b208 commit 590b5d0
2 files changed
+3
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
126 | | - | |
| 126 | + | |
127 | 127 | | |
0 commit comments