fixing error handling
This commit is contained in:
4
shared/api/errors/codes/cusProductErrCodes.ts
Normal file
4
shared/api/errors/codes/cusProductErrCodes.ts
Normal file
@@ -0,0 +1,4 @@
|
||||
export const CusProductErrorCode = {
|
||||
CustomerProductNotFound: "customer_product_not_found",
|
||||
CustomerProductAlreadyExists: "customer_product_already_exists",
|
||||
} as const;
|
||||
11
shared/api/errors/codes/productErrCodes.ts
Normal file
11
shared/api/errors/codes/productErrCodes.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
/**
|
||||
* Product-related error codes
|
||||
*/
|
||||
export const ProductErrorCode = {
|
||||
ProductNotFound: "product_not_found",
|
||||
ProductAlreadyExists: "product_already_exists",
|
||||
InvalidProductItem: "invalid_product_item",
|
||||
} as const;
|
||||
|
||||
export type ProductErrorCode =
|
||||
(typeof ProductErrorCode)[keyof typeof ProductErrorCode];
|
||||
Reference in New Issue
Block a user