REFACTOR: implement proper exceptions
Refactoring Task
Problem description
All error handling is currently done using generic Errors.
Affected Components/Files:
src/app/_components/create-exhibtion-modal.tsx
src/components/exhibition-editor.tsx
src/hooks/exhibition-actions.ts
-
- other files where errors are thrown
Tasks:
- Create custom descriptive exceptions for possible errors.
- Throw replace generic errors with custom ones where appropriate
- Identify errors based on type not the error message.
Acceptance Criteria:
-
CUstom exceptions are used where necessary -
Errors are identified based on type, not error message