Commit 62c0298
authored
Catch Throwable in getJsonObject to avoid breaking SDT serialization (#1104)
Since Jackson now serializes full objects when they are not HashMap
(commit 3e2b9e7), reflective invocation of getters like
HttpContextNull.getPostData() / getResponse() can throw InternalError.
InternalError extends Error (not Exception), so catch(Exception) did
not catch it and the error propagated up through GXSimpleCollection
.toJSonString(), breaking any call that serialized an SDT containing
an HttpContext (e.g. GAMLoginAdditionalParameters).
Widening the catch to Throwable lets getJsonObject log the problem
and return an empty JSON object, preserving the previous behavior
for objects that fail reflective serialization.1 parent 66bdc4d commit 62c0298
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
0 commit comments