fix: don't crash on 404, add sync debug logging
ProjectKey.fetch_key now returns empty defaults instead of raising RuntimeError on API errors. Added logging to _syncFromSource and fetch_key to trace the seq=4001 vs seq=4 mismatch. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
+8
-2
@@ -121,11 +121,17 @@ app.registerExtension({
|
||||
nodeType.prototype._syncFromSource = function () {
|
||||
const srcWidget = this.widgets?.find(w => w.name === "source_label");
|
||||
const source = this._findSource(srcWidget?.value);
|
||||
if (!source) return;
|
||||
if (!source) {
|
||||
console.log(`[ProjectKey] _syncFromSource id=${this.id}: no source found for label="${srcWidget?.value}"`);
|
||||
return;
|
||||
}
|
||||
for (const name of ["manager_url", "project_name", "file_name", "sequence_number"]) {
|
||||
const dst = this.widgets?.find(w => w.name === name);
|
||||
const src = source.widgets?.find(w => w.name === name);
|
||||
if (dst && src) dst.value = src.value;
|
||||
if (dst && src) {
|
||||
dst.value = src.value;
|
||||
console.log(`[ProjectKey] _syncFromSource id=${this.id}: ${name}="${src.value}"`);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user