Commit 835b9e2
fix: gracefully handle view tracking limitation in Table API
The Astra DB Table API does not yet expose the 'views' column defined
in the CQL schema, causing UNKNOWN_TABLE_COLUMNS errors. Additionally,
the Table API does not support the $inc operation, resulting in
UNSUPPORTED_UPDATE_OPERATIONS errors.
This commit implements graceful degradation by:
- Catching both error codes specifically
- Logging a clear warning message once per process
- Returning success without updating views (no-op)
- Preserving activity table logging for analytics
- Preventing 500 errors on the /view endpoint
The fix is future-proof: when API support is added, the code will
automatically resume normal operation.
Refs: docs/schema-astra.cql:95 (views column definition)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 88d7cbb commit 835b9e2
1 file changed
Lines changed: 32 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
91 | 94 | | |
92 | 95 | | |
93 | 96 | | |
| |||
384 | 387 | | |
385 | 388 | | |
386 | 389 | | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
387 | 394 | | |
388 | 395 | | |
389 | 396 | | |
| |||
400 | 407 | | |
401 | 408 | | |
402 | 409 | | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
403 | 431 | | |
404 | 432 | | |
405 | | - | |
406 | | - | |
407 | | - | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
408 | 437 | | |
409 | 438 | | |
410 | 439 | | |
| |||
0 commit comments