mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-14 19:22:14 +01:00
improve error handling for 401 requests and fetch
This commit is contained in:
@@ -39,12 +39,13 @@ export const useReportingStore = defineStore('reporting', () => {
|
||||
const organization = getCurrentOrganizationId();
|
||||
if (organization) {
|
||||
reportingGraphResponse.value = await handleApiRequestNotifications(
|
||||
api.getAggregatedTimeEntries({
|
||||
params: {
|
||||
organization: organization,
|
||||
},
|
||||
queries: params,
|
||||
}),
|
||||
() =>
|
||||
api.getAggregatedTimeEntries({
|
||||
params: {
|
||||
organization: organization,
|
||||
},
|
||||
queries: params,
|
||||
}),
|
||||
undefined,
|
||||
'Failed to fetch reporting data'
|
||||
);
|
||||
@@ -57,12 +58,13 @@ export const useReportingStore = defineStore('reporting', () => {
|
||||
const organization = getCurrentOrganizationId();
|
||||
if (organization) {
|
||||
reportingTableResponse.value = await handleApiRequestNotifications(
|
||||
api.getAggregatedTimeEntries({
|
||||
params: {
|
||||
organization: organization,
|
||||
},
|
||||
queries: params,
|
||||
}),
|
||||
() =>
|
||||
api.getAggregatedTimeEntries({
|
||||
params: {
|
||||
organization: organization,
|
||||
},
|
||||
queries: params,
|
||||
}),
|
||||
undefined,
|
||||
'Failed to fetch reporting data'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user