Package breakdown - initial commit 1.0.0
This commit is contained in:
12
lib/constants/errors.ts
Normal file
12
lib/constants/errors.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
export enum ErrorCodes {
|
||||
RESET_REQUEST_DATA = 'RESET_REQUEST_DATA',
|
||||
}
|
||||
|
||||
export const ErrorMessages = {
|
||||
[ErrorCodes.RESET_REQUEST_DATA]: 'A valid username and password must be provided',
|
||||
};
|
||||
|
||||
export const getErrorBody = (code: ErrorCodes) => ({
|
||||
code,
|
||||
message: ErrorMessages[code],
|
||||
});
|
||||
Reference in New Issue
Block a user