@abloatai/humans 0.43.0 → 0.44.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -53,6 +53,9 @@ export async function handleFailure(ctx, transaction, error) {
|
|
|
53
53
|
: '';
|
|
54
54
|
const reason = abloErr?.message ? ` — ${abloErr.message}` : '';
|
|
55
55
|
const code = abloErr?.code ? ` (code: ${abloErr.code})` : '';
|
|
56
|
+
const requestRef = abloErr?.requestId
|
|
57
|
+
? ` [request_id: ${abloErr.requestId}]`
|
|
58
|
+
: '';
|
|
56
59
|
// An optimistic write resolves before the server answers, so a later
|
|
57
60
|
// rejection has no caller left to return to and this log is the only
|
|
58
61
|
// place it appears. That reads to an application developer as their own
|
|
@@ -63,7 +66,7 @@ export async function handleFailure(ctx, transaction, error) {
|
|
|
63
66
|
const channelNote = ctx.config.enableOptimistic
|
|
64
67
|
? ' To surface this in your app, subscribe with `ablo.onMutationFailure(…)`.'
|
|
65
68
|
: '';
|
|
66
|
-
const headline = `Your ${transaction.type} to "${transaction.modelName}" was not saved${reason}${code}.${revertNote}${channelNote}`;
|
|
69
|
+
const headline = `Your ${transaction.type} to "${transaction.modelName}" was not saved${reason}${code}${requestRef}.${revertNote}${channelNote}`;
|
|
67
70
|
if (isRepeat) {
|
|
68
71
|
// Same write rejected for the same reason on each reconnect replay —
|
|
69
72
|
// log the forensics once, stay quiet after.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abloatai/humans",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0",
|
|
4
4
|
"description": "The optional human-facing local-state package for Ablo: presence, live queries, and React bindings.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"directory": "packages/humans"
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@abloatai/transaction": "^0.
|
|
87
|
+
"@abloatai/transaction": "^0.44.0",
|
|
88
88
|
"mobx": "^6.13.7",
|
|
89
89
|
"uuid": "^11.1.0",
|
|
90
90
|
"zod": "^4.4.3"
|
|
@@ -76,6 +76,9 @@ export async function handleFailure(ctx: FailureHandlingContext, transaction: Qu
|
|
|
76
76
|
: '';
|
|
77
77
|
const reason = abloErr?.message ? ` — ${abloErr.message}` : '';
|
|
78
78
|
const code = abloErr?.code ? ` (code: ${abloErr.code})` : '';
|
|
79
|
+
const requestRef = abloErr?.requestId
|
|
80
|
+
? ` [request_id: ${abloErr.requestId}]`
|
|
81
|
+
: '';
|
|
79
82
|
// An optimistic write resolves before the server answers, so a later
|
|
80
83
|
// rejection has no caller left to return to and this log is the only
|
|
81
84
|
// place it appears. That reads to an application developer as their own
|
|
@@ -86,7 +89,7 @@ export async function handleFailure(ctx: FailureHandlingContext, transaction: Qu
|
|
|
86
89
|
const channelNote = ctx.config.enableOptimistic
|
|
87
90
|
? ' To surface this in your app, subscribe with `ablo.onMutationFailure(…)`.'
|
|
88
91
|
: '';
|
|
89
|
-
const headline = `Your ${transaction.type} to "${transaction.modelName}" was not saved${reason}${code}.${revertNote}${channelNote}`;
|
|
92
|
+
const headline = `Your ${transaction.type} to "${transaction.modelName}" was not saved${reason}${code}${requestRef}.${revertNote}${channelNote}`;
|
|
90
93
|
|
|
91
94
|
if (isRepeat) {
|
|
92
95
|
// Same write rejected for the same reason on each reconnect replay —
|