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
1 change: 1 addition & 0 deletions src/configs/logs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export const ERROR_CODES = {
INFRA: 'INFRA_ERROR',
GUARD: 'GUARD_ERROR',
EMAIL_VALIDATION: 'EMAIL_VALIDATION_ERROR',
SUPABASE: 'SUPABASE_ERROR',
} as const

export const INFO_CODES = {
Expand Down
4 changes: 4 additions & 0 deletions src/server/team/get-team-members.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import { z } from 'zod'
import { TeamMemberInfo } from './types'
import { authActionClient } from '@/lib/clients/action'
import { returnServerError } from '@/lib/utils/action'
import { logError } from '@/lib/clients/logger'
import { ERROR_CODES } from '@/configs/logs'

const GetTeamMembersSchema = z.object({
teamId: z.string().uuid(),
Expand All @@ -26,6 +28,8 @@ export const getTeamMembers = authActionClient
.single()

if (userTeamsRelationError) {
logError(ERROR_CODES.SUPABASE, userTeamsRelationError)

return returnServerError('User is not authorized to get team members')
}

Expand Down