Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ extension MessageLabelType {
case .label("submited"): return MCOMessageFlag.submitted.rawValue
case .none: return 0
default:
assertionFailure("This label \(self) is not supported byt his provider")
assertionFailure("This label \(self) is not supported by this provider")
return 0
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,7 @@ class EnterpriseServerApi: EnterpriseServerApiType {
func getClientConfigurationForCurrentUser() -> Promise<ClientConfiguration> {
guard let email = DataService.shared.currentUser?.email else {
return Promise<ClientConfiguration> { _, reject in
assertionFailure("User has to be set while getting client configuration")
reject(AppErr.user("currentUser == nil"))
fatalError("User has to be set while getting client configuration")
}
}
return getClientConfiguration(for: email)
Expand Down
10 changes: 3 additions & 7 deletions FlowCrypt/Functionality/Services/GoogleUserService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ extension GoogleUserService: UserServiceType {
} else if let error = error {
reject(error)
} else {
assertionFailure()
fatalError("Shouldn't happe because covered received non nil error and non nil authState")
}
}

Expand Down Expand Up @@ -155,15 +155,11 @@ extension GoogleUserService {
completion: @escaping ((Result<GoogleUser, GoogleUserServiceError>) -> Void)
) {
guard let authorization = authorization else {
assertionFailure("authorization should not be nil at this point")
completion(.failure(.missedAuthorization))
return
fatalError("authorization should not be nil at this point")
}

guard let userInfoEndpoint = URL(string: "https://www.googleapis.com/oauth2/v3/userinfo") else {
assertionFailure("userInfoEndpoint should not be nil")
completion(.failure(.invalidUserEndpoint))
return
fatalError("userInfoEndpoint could not be nil because it's hardcoded string url")
}

let fetcherService = GTMSessionFetcherService()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,7 @@ extension OrganisationalRulesService: OrganisationalRulesServiceType {

func getSavedOrganisationalRulesForCurrentUser() -> OrganisationalRules {
guard let configuration = self.clientConfigurationProvider.fetch() else {
assertionFailure("There should not be a user without OrganisationalRules")
return OrganisationalRules(clientConfiguration: .empty)
fatalError("There should not be a user without OrganisationalRules")
}

return OrganisationalRules(clientConfiguration: configuration)
Expand Down