Commit 2d481a5
Detect encrypted output when client encryption is disabled
When server returns encrypted output but client didn't enable encryption,
throw clear ApiException instead of letting encrypted string leak to
downstream parsers causing fastjson syntax errors.
Detection logic: output is JsonPrimitive, length > 100, matches base64
pattern. Exception message guides users to set enableEncrypt(true).
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent d0e9fe6 commit 2d481a5
1 file changed
Lines changed: 14 additions & 0 deletions
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
103 | 117 | | |
104 | 118 | | |
105 | 119 | | |
| |||
0 commit comments