Skip to content

Commit 6d6543d

Browse files
author
Lasim
committed
bump frontend package version to 0.16.1 and update error handling for Zod validation
1 parent 7ab6290 commit 6d6543d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

services/frontend/src/components/admin/mcp-categories/CategoryModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ const validateForm = () => {
7676
CategorySchema.parse(formData.value)
7777
} catch (error) {
7878
if (error instanceof z.ZodError) {
79-
error.errors.forEach((err) => {
79+
error.issues.forEach((err) => {
8080
if (err.path.length > 0) {
8181
errors.value[err.path[0] as string] = err.message
8282
}

services/frontend/src/components/teams/AddTeamModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ const validateForm = () => {
5757
CreateTeamSchema.parse(formData.value)
5858
} catch (error) {
5959
if (error instanceof z.ZodError) {
60-
error.errors.forEach((err) => {
60+
error.issues.forEach((err) => {
6161
if (err.path.length > 0) {
6262
errors.value[err.path[0] as string] = err.message
6363
}

services/frontend/src/views/teams/manage/[id].vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ const saveTeam = async () => {
156156
157157
} catch (err) {
158158
if (err instanceof z.ZodError) {
159-
saveError.value = err.errors.map(e => e.message).join(', ')
159+
saveError.value = err.issues.map(e => e.message).join(', ')
160160
} else {
161161
saveError.value = err instanceof Error ? err.message : 'Failed to save team'
162162
}

0 commit comments

Comments
 (0)