Broaden Tasgird task lookup fallbacks
This commit is contained in:
+6
-1
@@ -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 || [],
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user