Commit Graph

5 Commits

Author SHA1 Message Date
kjs 3982aabc24 refactor: Enhance unique constraint validation across data operations
- Integrated `TableManagementService` to validate unique constraints before insert, update, and upsert actions in various controllers, including `dataflowExecutionController`, `dynamicFormController`, and `tableManagementController`.
- Improved error handling in `errorHandler` to provide detailed messages indicating which field has a unique constraint violation.
- Updated the `formatPgError` utility to extract and display specific column labels for unique constraint violations, enhancing user feedback.
- Adjusted the table schema retrieval to include company-specific nullable and unique constraints, ensuring accurate representation of database rules.

These changes improve data integrity by preventing duplicate entries and enhance user experience through clearer error messages related to unique constraints.
2026-03-10 16:15:20 +09:00
kjs 28ef7e1226 fix: Enhance error handling and validation messages in form data operations
- Integrated `formatPgError` utility to provide user-friendly error messages based on PostgreSQL error codes during form data operations.
- Updated error responses in `saveFormData`, `saveFormDataEnhanced`, `updateFormData`, and `updateFormDataPartial` to include specific messages based on the company context.
- Improved error handling in the frontend components to display relevant error messages from the server response, ensuring users receive clear feedback on save operations.
- Enhanced the required field validation by incorporating NOT NULL metadata checks across various components, improving the accuracy of form submissions.

These changes improve the overall user experience by providing clearer error messages and ensuring that required fields are properly validated based on both manual settings and database constraints.
2026-03-10 14:47:05 +09:00
leeheejin ab1308efe8 세금계산서 발행 완료 2025-12-08 16:01:59 +09:00
kjs ec5fae1a4d fix: Prisma 에러 처리 코드를 PostgreSQL 에러 코드로 변경
변경사항:

1. errorHandler.ts:
   - Prisma 에러 처리 제거
   - PostgreSQL 에러 코드 기반 처리 추가:
     * 23505: unique_violation (중복 데이터)
     * 23503: foreign_key_violation (참조 무결성)
     * 23502: not_null_violation (필수값 누락)

2. dataflowDiagramController.ts:
   - P2002 (Prisma) → 23505 (PostgreSQL)
   - unique constraint 에러 처리 개선

3. commonCodeController.ts:
   - Prisma 에러 처리 주석 수정
   - PostgreSQL 23505 에러 코드 추가

최종 확인:
-  prisma. 호출: 0개
-  PrismaClient import: 0개
-  Prisma 파일: 0개
-  package.json Prisma 의존성: 0개
-  TypeScript 컴파일 에러: 0개
-  모든 Prisma 관련 코드 제거 완료
2025-10-01 14:57:25 +09:00
kjs a0e5b57a24 최초커밋 2025-08-21 09:41:46 +09:00