public async Task <ActionResponse> DeleteUserRights(string userId) { try { if (string.IsNullOrEmpty(userId)) { return(new ActionResponse { Message = "Nothing was deleted on empty id", Status = ActionStatus.Warning }); } await _securityContext.DeleteUserRights(userId); return(new ActionResponse { Status = ActionStatus.Success }); } catch (SecurityDbException e) { return(new ActionResponse { Status = ActionStatus.Warning, Message = PrettyExceptionHelper.GetMessage(e) }); } catch (Exception e) { Console.WriteLine(e); return(new ActionResponse { Status = ActionStatus.Error, Message = "Something went wrong!" }); } }