                 completion(.failure(error))
             }
         }, failure: { (error) in
+            if let urlResponse = MXHTTPOperation.urlResponse(fromError: error),
+               urlResponse.statusCode == HTTPStatusCodes.notFound {
+                completion(.failure(JitsiServiceError.noWellKnown))
+                return
+            }
             completion(.failure(error ?? JitsiServiceError.unknown))
         })
     }

    /// Create Jitsi widget content
    @discardableResult
    func createJitsiWidgetContent(jitsiServerURL: URL, roomID: String, isAudioOnly: Bool, success: @escaping ([String: Any]) -> Void, failure: @escaping ((Error) -> Void)) -> MXHTTPOperation? {
        return self.getWellKnown(for: jitsiServerURL) { (result) in
            switch result {
            case .success(let jitsiWellKnown):
                if let serverDomain = jitsiServerURL.host, let widgetContent = self.createJitsiWidgetContent(serverDomain: serverDomain,
                                                                                                             authenticationType: jitsiWellKnown.authenticationType,
                                                                                                             roomID: roomID,
                                                                                                             isAudioOnly: isAudioOnly) {
                    success(widgetContent)
                } else {
                    failure(JitsiServiceError.widgetContentCreationFailed)
                }
            case .failure(let error):
                NSLog("[JitsiService] Fail to get Jitsi Well Known with error: \(error)")
                failure(error)
            }
        }
    }

enum JitsiServiceError: Error {
    case widgetContentCreationFailed
    case emptyResponse
    case noWellKnown
    case unknown
}

private enum HTTPStatusCodes {
    static let notFound: Int = 404
}

/// JitsiService enables to abstract and configure Jitsi Meet SDK
