diff --git a/Forji/Forji/Services/BackgroundDownloadManager.swift b/Forji/Forji/Services/BackgroundDownloadManager.swift index 2699203..c7dfd6d 100644 --- a/Forji/Forji/Services/BackgroundDownloadManager.swift +++ b/Forji/Forji/Services/BackgroundDownloadManager.swift @@ -87,7 +87,9 @@ final class BackgroundDownloadManager: NSObject, Sendable { for: instance.serverURL, username: instance.username, ) else { return nil } - var components = URLComponents(string: "\(instance.serverURL)/api/v1/notifications")! + guard var components = URLComponents(string: "\(instance.serverURL)/api/v1/notifications") else { + return nil + } components.queryItems = [ URLQueryItem(name: "status-types", value: "unread"), URLQueryItem(name: "page", value: "1"),