Skip to content

Commit

Permalink
feat: 태그 생성 시 길이가 200이 넘는 경우 에러 발생
Browse files Browse the repository at this point in the history
  • Loading branch information
dmdgpdi committed Dec 30, 2024
1 parent d53f69b commit d3cc7c7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
usePickStore,
useUpdatePickStore,
} from '@/stores';
import { notifyError, numberToRandomColor } from '@/utils';
import { numberToRandomColor } from '@/utils';
import { DeleteTagDialog } from './DeleteTagDialog';
import { DeselectTagButton } from './DeselectTagButton';
import { SelectedTagItem } from '../SelectedTagItem';
Expand Down Expand Up @@ -100,10 +100,8 @@ export function PickTagAutocompleteDialog({
});
randomNumber.current = getRandomInt();
onSelectTag(newTag!);
} catch (error) {
if (error instanceof Error) {
notifyError(error.message);
}
} catch {
/* empty */
} finally {
isCreateFetchPendingRef.current = false;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import DOMPurify from 'dompurify';
import { EllipsisIcon } from 'lucide-react';
import { useDisclosure } from '@/hooks';
import { useTagStore } from '@/stores';
import { notifyError, isEmptyString, isShallowEqualValue } from '@/utils';
import { isEmptyString, isShallowEqualValue } from '@/utils';
import { ShowDeleteTagDialogButton } from './ShowDeleteTagDialogButton';
import {
tagInfoEditFormLayout,
Expand Down Expand Up @@ -60,10 +60,8 @@ export function TagInfoEditPopoverButton({
name: newTagName,
colorNumber: tag.colorNumber,
});
} catch (error) {
if (error instanceof Error) {
notifyError(error.message);
}
} catch {
/* empty */
}
};

Expand Down
1 change: 1 addition & 0 deletions frontend/techpick/src/constants/errorMessageJson.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export const ERROR_MESSAGE_JSON: { [key: string]: string } = {
'TG-001': '중복된 태그가 존재합니다.',
'TG-002': '유효하지 않는 태그 이름입니다.',
'TG-003': '잘못된 태그에 접근했습니다.',
'TG-005': '태그명이 허용된 최대길이를 초과했습니다.',
'LI-000': '존재하지 않는 링크입니다.',
'LI-002': '이미 존재하는 링크입니다.',
'LI-003': '이 링크는 넣을 수 없습니다. ㅠㅠ',
Expand Down

0 comments on commit d3cc7c7

Please sign in to comment.