Browse Source

fix: unhandled exception - show error message if list api failed

pull/7392/head
Pranav C 12 months ago
parent
commit
4ee587757d
  1. 14
      packages/nc-gui/composables/useViewData.ts

14
packages/nc-gui/composables/useViewData.ts

@ -211,7 +211,8 @@ export function useViewData(
if (error.code === 'ERR_CANCELED') {
return
}
throw error
console.error(error)
return message.error(await extractSdkResponseErrorMsg(error))
}
formattedData.value = formatData(response.list)
paginationData.value = response.pageInfo
@ -238,10 +239,13 @@ export function useViewData(
async function changePage(page: number) {
paginationData.value.page = page
await loadData({
offset: (page - 1) * (paginationData.value.pageSize || appInfoDefaultLimit),
where: where?.value,
} as any)
await loadData(
{
offset: (page - 1) * (paginationData.value.pageSize || appInfoDefaultLimit),
where: where?.value,
} as any,
true,
)
}
const {

Loading…
Cancel
Save