mirror of
https://github.com/hoppscotch/hoppscotch
synced 2024-11-23 07:39:55 +00:00
refactor: error message updated
This commit is contained in:
parent
b33d003ba5
commit
e2d8ea0a70
@ -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;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -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';
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user