Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update authentication error messages for better clarity #147

Merged
merged 2 commits into from
Sep 21, 2024
Merged
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
4 changes: 2 additions & 2 deletions app/business/services/user/user.command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ export async function authenticate(prevState: FormState, formData: FormData): Pr
}
} catch (error) {
// λͺ…세와 λ‹€λ₯΄κ²Œ μ—λŸ¬κ°€ λ°œμƒν•  경우 BadRequestErrorκ°€ μ•„λ‹ˆλΌ UnauthorizedErrorκ°€ λ°œμƒ
if (error instanceof UnauthorizedError) {
if (error instanceof UnauthorizedError || error instanceof BadRequestError) {
// 잘λͺ»λœ μš”μ²­ 처리 둜직
return {
isSuccess: false,
isFailure: true,
validationError: {},
message: error.message,
message: '아이디 λ˜λŠ” λΉ„λ°€λ²ˆν˜Έκ°€ μΌμΉ˜ν•˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.',
};
} else {
// λ‚˜λ¨Έμ§€ μ—λŸ¬λŠ” 더 μƒμœ„ μˆ˜μ€€μ—μ„œ 처리
Expand Down
Loading