fix: change wording on error

This commit is contained in:
ilham 2021-12-17 01:46:22 +07:00
parent 3c8b018937
commit c5b5a4ab06
8 changed files with 22 additions and 22 deletions

View File

@ -34,7 +34,7 @@ export class CommissionService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Commission not found',
},
HttpStatus.NOT_FOUND,
);
@ -52,7 +52,7 @@ export class CommissionService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Commission not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -25,7 +25,7 @@ export class ProductHistoryPriceService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Price not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -54,7 +54,7 @@ export class ProductCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Categories not found',
},
HttpStatus.NOT_FOUND,
);
@ -76,7 +76,7 @@ export class ProductCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Categories not found',
},
HttpStatus.NOT_FOUND,
);
@ -97,7 +97,7 @@ export class ProductCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Categories not found',
},
HttpStatus.NOT_FOUND,
);
@ -122,7 +122,7 @@ export class ProductCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Categories not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -49,7 +49,7 @@ export class ProductSubCategoriesService {
.createQueryBuilder('product_sub_categories')
.leftJoinAndSelect('product_sub_categories.category', 'category');
if (category != 'null') {
if (category != 'null' && category) {
baseQuery.where({
category: category,
});
@ -90,7 +90,7 @@ export class ProductSubCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Sub Categories not found',
},
HttpStatus.NOT_FOUND,
);
@ -111,7 +111,7 @@ export class ProductSubCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Sub Categories not found',
},
HttpStatus.NOT_FOUND,
);
@ -140,7 +140,7 @@ export class ProductSubCategoriesService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product Sub Categories not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -216,7 +216,7 @@ export class ProductService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product not found',
},
HttpStatus.NOT_FOUND,
);
@ -234,7 +234,7 @@ export class ProductService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product not found',
},
HttpStatus.NOT_FOUND,
);
@ -283,7 +283,7 @@ export class ProductService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Product not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -66,7 +66,7 @@ export class CoaService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'COA not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -164,7 +164,7 @@ export class SupplierService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'Supplier not found',
},
HttpStatus.NOT_FOUND,
);

View File

@ -205,7 +205,7 @@ export class UsersService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'User not found',
},
HttpStatus.NOT_FOUND,
);
@ -228,7 +228,7 @@ export class UsersService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'User not found',
},
HttpStatus.NOT_FOUND,
);
@ -258,7 +258,7 @@ export class UsersService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'User not found',
},
HttpStatus.NOT_FOUND,
);
@ -276,7 +276,7 @@ export class UsersService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'User not found',
},
HttpStatus.NOT_FOUND,
);
@ -337,7 +337,7 @@ export class UsersService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'User not found',
},
HttpStatus.NOT_FOUND,
);
@ -371,7 +371,7 @@ export class UsersService {
throw new HttpException(
{
statusCode: HttpStatus.NOT_FOUND,
error: 'Data not found',
error: 'User not found',
},
HttpStatus.NOT_FOUND,
);