Commit 3c28891
committed
fix(api): validate WhatsApp credentials at runtime instead of non-null assertions
The credential fields (appSecret, verifyToken) are intentionally optional
in the shared config since existing outbound-only integrations don't need
them. Add an explicit guard in buildAdapters() that throws a clear error
when the agent adapter is created without the required fields.
Made-with: Cursor1 parent ab3ebcb commit 3c28891
1 file changed
Lines changed: 10 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
245 | 245 | | |
246 | 246 | | |
247 | 247 | | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
248 | 254 | | |
249 | 255 | | |
250 | 256 | | |
251 | 257 | | |
252 | | - | |
253 | | - | |
254 | | - | |
255 | | - | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
256 | 262 | | |
257 | 263 | | |
258 | 264 | | |
| |||
0 commit comments