diff --git a/packages/frontend-core/src/fetch/ViewV2Fetch.js b/packages/frontend-core/src/fetch/ViewV2Fetch.js index ac619acd19..d8b96df7ae 100644 --- a/packages/frontend-core/src/fetch/ViewV2Fetch.js +++ b/packages/frontend-core/src/fetch/ViewV2Fetch.js @@ -25,6 +25,10 @@ export default class ViewV2Fetch extends DataFetch { const res = await this.API.viewV2.fetchDefinition(datasource.id) return res?.data } catch (error) { + this.store.update(state => ({ + ...state, + error, + })) return null } } diff --git a/packages/server/src/api/routes/row.ts b/packages/server/src/api/routes/row.ts index a4ac8aa3ee..eb59136e06 100644 --- a/packages/server/src/api/routes/row.ts +++ b/packages/server/src/api/routes/row.ts @@ -269,6 +269,7 @@ router router.post( "/api/v2/views/:viewId/search", + paramResource("viewId"), authorized(PermissionType.TABLE, PermissionLevel.READ), rowController.views.searchView )