mirror of
https://github.com/vercel/commerce.git
synced 2025-07-26 19:51:23 +00:00
✨ feat: login
:%s
This commit is contained in:
14
src/utils/errrorMapping.ts
Normal file
14
src/utils/errrorMapping.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { LANGUAGE } from "./language.utils";
|
||||
|
||||
export function errorMapping(message?: string) {
|
||||
if (!message) {
|
||||
return LANGUAGE.MESSAGE.ERROR
|
||||
}
|
||||
|
||||
switch (message) {
|
||||
case 'The provided credentials are invalid':
|
||||
return 'The email address or password is incorrect!'
|
||||
default:
|
||||
return LANGUAGE.MESSAGE.ERROR
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user