Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions backend/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"type": "bug",
"message": "Resolved a bug which prevented user source users from being searched.",
"issue_origin": "github",
"issue_number": 4850,
"domain": "builder",
"bullet_points": [],
"created_at": "2026-02-23"
}
Original file line number Diff line number Diff line change
Expand Up @@ -216,19 +216,26 @@ const router = useRouter()
const { $client, $registry } = useNuxtApp()

// Fetch license data
const { data } = await useAsyncData(`license-${route.params.id}`, async () => {
try {
const { data: licenseData } = await LicenseService($client).fetch(
route.params.id
)
return licenseData
} catch {
throw createError({
statusCode: 404,
message: 'The license was not found.',
})
const { data, error } = await useAsyncData(
`license-${route.params.id}`,
async () => {
try {
const { data: licenseData } = await LicenseService($client).fetch(
route.params.id
)
return licenseData
} catch {
throw createError({
statusCode: 404,
message: 'The license was not found.',
})
}
}
})
)

if (error.value) {
throw error.value
}

const license = computed(() => data.value)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ const { $client, $registry, $i18n } = useNuxtApp()
useHead({ title: $i18n.t('licenses.titleLicenses') })

// Fetch data using useAsyncData and return the values from the callback
const { data } = await useAsyncData('licensesPage', async () => {
const { data, error } = await useAsyncData('licensesPage', async () => {
try {
const [{ data: instanceData }, { data: licensesData }] = await Promise.all([
SettingsService($client).getInstanceID(),
Expand All @@ -183,11 +183,16 @@ const { data } = await useAsyncData('licensesPage', async () => {
} catch (e) {
throw createError({
statusCode: 400,
statusMessage: 'Something went wrong while fetching the licenses.',
message: 'Something went wrong while fetching the licenses.',
fatal: true,
})
}
})

if (error.value) {
throw error.value
}

const licenses = computed(() => data.value?.licenses || [])
const instanceId = computed(() => data.value?.instanceId || '')

Expand Down
6 changes: 5 additions & 1 deletion web-frontend/modules/automation/pages/automationWorkflow.vue
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ const automationApplicationType = $registry.get(
AutomationApplicationType.getType()
)

const { data: pageData } = await useAsyncData(
const { data: pageData, error } = await useAsyncData(
() => `automation-workflow-${automationId.value}-${workflowId.value}`,
async () => {
try {
Expand Down Expand Up @@ -151,6 +151,10 @@ const { data: pageData } = await useAsyncData(
}
)

if (error.value) {
throw error.value
}

// Computed properties from async data
const automation = computed(() => pageData.value?.automation ?? null)
const workspace = computed(() => pageData.value?.workspace ?? null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
throw createError({
statusCode: 404,
message: $i18n.t('pageEditor.pageNotFound'),
fatal: false,
})
}
})
7 changes: 1 addition & 6 deletions web-frontend/modules/builder/pages/pageEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,7 @@ const {
)

if (pageError.value) {
// If we have an error we want to display it.
if (pageError.value.statusCode === 404) {
showError(pageError.value)
} else {
throw pageError.value
}
throw pageError.value
}

const workspace = computed(() => pageData.value.workspace)
Expand Down
15 changes: 5 additions & 10 deletions web-frontend/modules/builder/pages/publicPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const {
} catch (e) {
throw createError({
statusCode: 404,
statusMessage: $i18n.t('publicPage.siteNotFound'),
message: $i18n.t('publicPage.siteNotFound'),
})
}

Expand Down Expand Up @@ -173,7 +173,7 @@ const {
if (authError) {
throw createError({
statusCode: authError.code,
statusMessage: authError.message,
message: authError.message,
})
}
}
Expand All @@ -190,7 +190,7 @@ const {
if (!found) {
throw createError({
statusCode: 404,
statusMessage: $i18n.t('publicPage.pageNotFound'),
message: $i18n.t('publicPage.pageNotFound'),
})
}

Expand All @@ -199,7 +199,7 @@ const {
if (pageFound.shared) {
throw createError({
statusCode: 404,
statusMessage: $i18n.t('publicPage.pageNotFound'),
message: $i18n.t('publicPage.pageNotFound'),
})
}

Expand Down Expand Up @@ -288,12 +288,7 @@ const {
)

if (error.value) {
// If we have an error we want to display it.
if (error.value.statusCode === 404) {
showError(error.value)
} else {
throw error.value
}
throw error.value
}

const workspace = computed(() => asyncDataResult.value?.workspace)
Expand Down
24 changes: 19 additions & 5 deletions web-frontend/modules/core/components/SelectSearch.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
<div class="select__search">
<i class="select__search-icon iconoir-search"></i>
<input
:value="value"
:value="currentValue"
type="text"
class="select__search-input"
v-bind="$attrs"
:placeholder="placeholder || $t('action.search')"
@input="$emit('input', $event.target.value)"
@input="emitChange($event.target.value)"
/>
</div>
</template>
Expand All @@ -18,15 +18,29 @@ export default {
props: {
value: {
type: String,
required: false,
default: null,
default: undefined,
},
modelValue: {
type: String,
default: undefined,
},
placeholder: {
type: String,
required: false,
default: '',
},
},
emits: ['input'],
emits: ['input', 'update:modelValue'],
computed: {
currentValue() {
return this.modelValue !== undefined ? this.modelValue : this.value
},
},
methods: {
emitChange(newValue) {
this.$emit('input', newValue)
this.$emit('update:modelValue', newValue)
},
},
}
</script>
1 change: 1 addition & 0 deletions web-frontend/modules/core/middleware/urlCheck.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export default defineNuxtRouteMiddleware(() => {
hideBackButton: true,
message: translate('urlCheck.invalidUrlEnvVarTitle', { name }),
content: translate('urlCheck.invalidUrlEnvVarDescription', { name }),
fatal: true,
})
}
}
Expand Down
1 change: 1 addition & 0 deletions web-frontend/modules/core/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export default defineNuxtModule({
)

addPlugin(resolve('plugins/store.js'))
addPlugin(resolve('plugins/errorHandler.js'))
addPlugin(resolve('plugins/filters.js'))
addPlugin(resolve('plugins/vuexState.js'))
addPlugin(resolve('plugin.js'))
Expand Down
24 changes: 14 additions & 10 deletions web-frontend/modules/core/pages/notificationRedirect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,23 @@ const notificationId = route.params.notificationId
const { data: notification, error: loadError } = await useAsyncData(
() => `notification:${workspaceId}:${notificationId}`,
async () => {
const { data } = await notificationService(nuxtApp.$client).markAsRead(
workspaceId,
notificationId
)
return data
try {
const { data } = await notificationService(nuxtApp.$client).markAsRead(
workspaceId,
notificationId
)
return data
} catch {
throw createError({
statusCode: 404,
message: 'Notification not found.',
})
}
}
)

if (loadError.value || !notification.value) {
throw createError({
statusCode: 404,
statusMessage: 'Notification not found.',
})
throw loadError.value
}

const notificationType = nuxtApp.$registry.get(
Expand All @@ -39,7 +43,7 @@ const redirectParams = notificationType.getRoute(notification.value.data)
if (!redirectParams) {
throw createError({
statusCode: 404,
statusMessage: 'Notification has no route.',
message: 'Notification has no route.',
})
}

Expand Down
6 changes: 5 additions & 1 deletion web-frontend/modules/core/pages/settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const store = nuxtApp.$store
const { $i18n } = nuxtApp

/* asyncData → useAsyncData */
const { data: workspace } = await useAsyncData('workspace', async () => {
const { data: workspace, error } = await useAsyncData('workspace', async () => {
try {
return await store.dispatch(
'workspace/selectById',
Expand All @@ -53,6 +53,10 @@ const { data: workspace } = await useAsyncData('workspace', async () => {
}
})

if (error.value) {
throw error.value
}

/* Registry access */
const registry = nuxtApp.$registry

Expand Down
9 changes: 7 additions & 2 deletions web-frontend/modules/core/pages/workspace.vue
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ const {
} catch (e) {
throw createError({
statusCode: 404,
statusMessage: 'Workspace not found.',
message: 'Workspace not found.',
})
}

Expand All @@ -330,12 +330,17 @@ const {
} catch {
throw createError({
statusCode: 400,
statusMessage: 'Error loading dashboard.',
message: 'Error loading dashboard.',
fatal: true,
})
}
}
)

if (error.value) {
throw error.value
}

/**
* Hydrate local refs from the async data.
* Keeps your existing `selectedWorkspace` and `workspaceComponentArguments`
Expand Down
14 changes: 14 additions & 0 deletions web-frontend/modules/core/plugins/errorHandler.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import { showError } from '#imports'

export default defineNuxtPlugin((nuxtApp) => {
const defaultHandler = nuxtApp.vueApp.config.errorHandler

nuxtApp.vueApp.config.errorHandler = (error, instance, info) => {
if (error.fatal === false) {
showError(error)
return false
} else {
return defaultHandler(error, instance, info)
}
}
})
5 changes: 5 additions & 0 deletions web-frontend/modules/core/utils/sentryFakeTransport.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { createTransport } from '@sentry/core'

export function makeFakeTransport(options) {
return createTransport(options, async () => ({ statusCode: 200 }))
}
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
throw createError({
statusCode: 404,
message: 'Dashboard not found.',
fatal: false,
})
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ export default defineNuxtRouteMiddleware(async (to, from) => {
throw createError({
statusCode: e.response?.status || 404,
message: normalizeError(e).message,
fatal: false,
})
}

Expand Down
Loading
Loading