From eba8e9698c09b805d8ac2a8f58db93b947ac29e3 Mon Sep 17 00:00:00 2001 From: crupest Date: Sat, 13 Jun 2020 00:28:35 +0800 Subject: refactor(back): Fix #100 . --- Timeline/Services/UserService.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Timeline/Services/UserService.cs') diff --git a/Timeline/Services/UserService.cs b/Timeline/Services/UserService.cs index e0a5ab50..c20b180c 100644 --- a/Timeline/Services/UserService.cs +++ b/Timeline/Services/UserService.cs @@ -8,6 +8,7 @@ using Timeline.Entities; using Timeline.Helpers; using Timeline.Models; using Timeline.Models.Validation; +using Timeline.Services.Exceptions; using static Timeline.Resources.Services.UserService; namespace Timeline.Services @@ -197,7 +198,7 @@ namespace Timeline.Services private static void ThrowUsernameConflict() { - throw new ConflictException(ExceptionUsernameConflict); + throw new EntityAlreadyExistException(EntityNames.User, ExceptionUsernameConflict); } private static User CreateUserFromEntity(UserEntity entity) -- cgit v1.2.3