Broaden Tasgird task lookup fallbacks

This commit is contained in:
2026-03-29 03:19:52 +00:00
parent 69c8d80ef2
commit a34b362683
2 changed files with 100 additions and 12 deletions
+6 -1
View File
@@ -387,7 +387,10 @@
});
const data = await resp.json().catch(() => ({}));
if (!resp.ok || !data?.success) {
throw new Error(data?.message || 'Failed to load tasks');
const details = data?.details
? (typeof data.details === 'string' ? data.details : JSON.stringify(data.details))
: '';
throw new Error(details ? `${data?.message || 'Failed to load tasks'}: ${details}` : (data?.message || 'Failed to load tasks'));
}
if (data?.userName && taskUserSelect.value !== data.userName) {
taskUserSelect.value = data.userName;
@@ -397,6 +400,8 @@
message: `Loaded ${data?.count ?? 0} task(s)`,
userName: data?.userName || userName,
userId: data?.userId || undefined,
authUser: data?.authUser || undefined,
lookupMethod: data?.lookupMethod || undefined,
warning: data?.warning || undefined,
tasks: data.tasks || [],
});