refactor: error message updated

This commit is contained in:
Mir Arif Hasan 2023-01-05 15:38:18 +06:00
parent b33d003ba5
commit e2d8ea0a70
3 changed files with 5 additions and 5 deletions

View File

@ -165,7 +165,7 @@ export const TEAM_ENVIRONMENT_NOT_TEAM_MEMBER =
* User setting not found for a user
* (UserSettingsService)
*/
export const USER_SETTINGS_NOT_FOUND = 'user_settings/not_found' as const;
export const USER_SETTINGS_DATA_NOT_FOUND = 'user_settings/data_not_found' as const;
/**

View File

@ -6,7 +6,7 @@ import {
JSON_INVALID,
USER_NOT_FOUND,
USER_SETTINGS_NULL_SETTINGS,
USER_SETTINGS_NOT_FOUND,
USER_SETTINGS_DATA_NOT_FOUND,
} from 'src/errors';
import { UserSettings } from './user-settings.model';
import { User } from 'src/user/user.model';

View File

@ -8,7 +8,7 @@ import { UserSettings } from './user-settings.model';
import {
USER_SETTINGS_ALREADY_EXISTS,
USER_SETTINGS_NULL_SETTINGS,
USER_SETTINGS_NOT_FOUND,
USER_SETTINGS_DATA_NOT_FOUND,
} from 'src/errors';
@Injectable()
@ -37,7 +37,7 @@ export class UserSettingsService {
return E.right(settings);
} catch (e) {
return E.left(USER_SETTINGS_NOT_FOUND);
return E.left(USER_SETTINGS_DATA_NOT_FOUND);
}
}
@ -104,7 +104,7 @@ export class UserSettingsService {
return E.right(settings);
} catch (e) {
return E.left(USER_SETTINGS_NOT_FOUND);
return E.left(USER_SETTINGS_DATA_NOT_FOUND);
}
}
}