                     self.extractTokens(response: unWrappedResponse, tokenResponseDelegate: tokenResponseDelegate)
                 }
                 else {
-                    tokenResponseDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Failed to extract tokens"))
+                    tokenResponseDelegate.onAuthorizationFailure(error: .authorizationFailure("Failed to extract tokens"))
                 }
             } else {
                 guard let response = response else {
-                    tokenResponseDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Failed to retrieve tokens"))
+                    tokenResponseDelegate.onAuthorizationFailure(error: .authorizationFailure("Failed to retrieve tokens"))
                     return
                 }
                 
                 guard let errorText = response.responseText,
-                    let errorJson = try? Utils.parseJsonStringtoDictionary(errorText) as? [String: String] else {
-                        tokenResponseDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Failed to retrieve tokens"))
+                    let errorJson = try? Utils.parseJsonStringtoDictionary(errorText) as? [String: String],
+                    let errorDescription = errorJson?["error_description"] else {
+                        tokenResponseDelegate.onAuthorizationFailure(error: .authorizationFailure("Failed to retrieve tokens"))
                         return
                 }
                 

        
        guard let clientId = self.registrationManager.getRegistrationDataString(name: AppIDConstants.client_id_String) else {
            TokenManager.logger.error(message: "Client not registered")
            tokenResponseDelegate.onAuthorizationFailure(error: AuthorizationError.authorizationFailure("Client not registered"))
            return
        }
        

                                                         response:response)
        } catch (_) {
            TokenManager.logger.error(message: "Failed to parse server response - failed to parse json")
            tokenResponseDelegate.onAuthorizationFailure(error: .authorizationFailure("Failed to parse server response - failed to parse json"))
            return
        }
        
