From 4e17cf18c25fa2649b8e3b57a36c1f14fa991d7d Mon Sep 17 00:00:00 2001 From: Katherine Bertelsen Date: Mon, 7 Apr 2025 16:25:10 -0500 Subject: [PATCH] [BWA-155] Move ResponseValidationHandler to BitwardenKit (#1486) --- .../Extentions/Error+Networking.swift | 1 + .../Extentions/ErrorNetworkingTests.swift | 1 + .../Services/API/Errors/ServerError.swift | 29 ---------- .../ResponseValidationHandlerTests.swift | 57 ------------------- .../Extensions/Alert+Networking.swift | 1 + .../Extensions/Alert+NetworkingTests.swift | 1 + .../ResponseValidationErrorModel.swift | 48 ++++++++++++++++ .../ResponseValidationErrorModelTests.swift | 3 +- .../Fixtures/APITestData+Account.swift | 4 -- .../Services/API/Errors/ServerError.swift | 5 +- .../API/Fixtures/APITestData+Error.swift | 11 ++++ .../API/Fixtures/BitwardenErrorMessage.json | 0 .../BitwardenKitMocksBundleFinder.swift | 5 ++ .../Handlers/ResponseValidationHandler.swift | 25 ++++++-- .../ResponseValidationHandlerTests.swift | 3 +- .../ResponseValidationErrorModel.swift | 35 ------------ .../Extensions/Error+Networking.swift | 1 + .../Extensions/ErrorNetworkingTests.swift | 1 + .../API/Fixtures/BitwardenErrorMessage.json | 8 --- .../Handlers/ResponseValidationHandler.swift | 38 ------------- .../PasswordHintProcessorTests.swift | 1 + .../Extensions/Alert+Networking.swift | 1 + .../DeleteAccountProcessor.swift | 1 + .../ExportVaultProcessor.swift | 1 + TestHelpers/API/APITestData.swift | 5 -- 25 files changed, 99 insertions(+), 187 deletions(-) delete mode 100644 AuthenticatorShared/Core/Platform/Services/API/Errors/ServerError.swift delete mode 100644 AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift create mode 100644 BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModel.swift rename {BitwardenShared => BitwardenKit}/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift (97%) rename {BitwardenShared => BitwardenKit}/Core/Platform/Services/API/Errors/ServerError.swift (90%) create mode 100644 BitwardenKit/Core/Platform/Services/API/Fixtures/APITestData+Error.swift rename {AuthenticatorShared => BitwardenKit}/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json (100%) create mode 100644 BitwardenKit/Core/Platform/Services/API/Fixtures/BitwardenKitMocksBundleFinder.swift rename {AuthenticatorShared => BitwardenKit}/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift (60%) rename {BitwardenShared => BitwardenKit}/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift (97%) delete mode 100644 BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModel.swift delete mode 100644 BitwardenShared/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json delete mode 100644 BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift diff --git a/AuthenticatorShared/Core/Platform/Extentions/Error+Networking.swift b/AuthenticatorShared/Core/Platform/Extentions/Error+Networking.swift index 7414cd543..a53563ce4 100644 --- a/AuthenticatorShared/Core/Platform/Extentions/Error+Networking.swift +++ b/AuthenticatorShared/Core/Platform/Extentions/Error+Networking.swift @@ -1,3 +1,4 @@ +import BitwardenKit import Foundation public extension Error { diff --git a/AuthenticatorShared/Core/Platform/Extentions/ErrorNetworkingTests.swift b/AuthenticatorShared/Core/Platform/Extentions/ErrorNetworkingTests.swift index 622ef6609..5dc26a418 100644 --- a/AuthenticatorShared/Core/Platform/Extentions/ErrorNetworkingTests.swift +++ b/AuthenticatorShared/Core/Platform/Extentions/ErrorNetworkingTests.swift @@ -1,4 +1,5 @@ import BitwardenKit +import BitwardenKitMocks import Networking import TestHelpers import XCTest diff --git a/AuthenticatorShared/Core/Platform/Services/API/Errors/ServerError.swift b/AuthenticatorShared/Core/Platform/Services/API/Errors/ServerError.swift deleted file mode 100644 index 9f4a48e15..000000000 --- a/AuthenticatorShared/Core/Platform/Services/API/Errors/ServerError.swift +++ /dev/null @@ -1,29 +0,0 @@ -import BitwardenKit - -// MARK: - ServerError - -/// An enumeration of server errors. -/// -enum ServerError: Error, Equatable { - /// A generic error. - /// - /// - Parameter errorResponse: The error response returned from the API request. - /// - case error(errorResponse: ErrorResponseModel) - - /// A validation error. - /// - /// - Parameter validationErrorResponse: The validation error response returned from the API request. - /// - case validationError(validationErrorResponse: ResponseValidationErrorModel) - - /// A computed property that returns an error message based on the case. - var message: String { - switch self { - case let .error(errorResponse): - errorResponse.singleMessage() - case let .validationError(validationErrorResponse): - validationErrorResponse.errorModel.message - } - } -} diff --git a/AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift b/AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift deleted file mode 100644 index 815f710e7..000000000 --- a/AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift +++ /dev/null @@ -1,57 +0,0 @@ -import BitwardenKit -import Networking -import TestHelpers -import XCTest - -@testable import AuthenticatorShared - -class ResponseValidationHandlerTests: BitwardenTestCase { - // MARK: Properties - - var subject: ResponseValidationHandler! - - // MARK: Setup & Teardown - - override func setUp() { - super.setUp() - - subject = ResponseValidationHandler() - } - - override func tearDown() { - super.tearDown() - - subject = nil - } - - // MARK: Tests - - /// `handle(_:)` doesn't throw an error for successful status codes. - func test_handle_validResponse() async throws { - for statusCode in [200, 250, 299] { - var response = HTTPResponse.success(statusCode: statusCode) - let handledResponse = try await subject.handle(&response) - XCTAssertEqual(handledResponse, response) - } - } - - /// `handle(_:)` throws a `ServerError` if the response is able to be parsed as a `ErrorResponseModel`. - func test_handle_throwsServerError() async throws { - var response = HTTPResponse.failure(statusCode: 400, body: APITestData.bitwardenErrorMessage.data) - - try await assertAsyncThrows(error: ServerError.error(errorResponse: ErrorResponseModel(response: response))) { - _ = try await subject.handle(&response) - } - } - - /// `handle(_:)` throws a `ResponseValidationError` for any non-2XX status codes that aren't - /// able to be parsed as a `ErrorResponseModel`. - func test_handle_throwsResponseValidationError() async { - for statusCode in [400, 499, 500, 599] { - var response = HTTPResponse.failure(statusCode: statusCode) - await assertAsyncThrows(error: ResponseValidationError(response: response)) { - _ = try await subject.handle(&response) - } - } - } -} diff --git a/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+Networking.swift b/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+Networking.swift index 513874ac8..9eb72eb6e 100644 --- a/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+Networking.swift +++ b/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+Networking.swift @@ -1,3 +1,4 @@ +import BitwardenKit import BitwardenSdk import Foundation diff --git a/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+NetworkingTests.swift b/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+NetworkingTests.swift index e88b0c86d..6367c1407 100644 --- a/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+NetworkingTests.swift +++ b/AuthenticatorShared/UI/Platform/Application/Extensions/Alert+NetworkingTests.swift @@ -1,6 +1,7 @@ // swiftlint:disable:this file_name import BitwardenKit +import BitwardenKitMocks import Foundation import Networking import TestHelpers diff --git a/BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModel.swift b/BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModel.swift new file mode 100644 index 000000000..fa946c0f3 --- /dev/null +++ b/BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModel.swift @@ -0,0 +1,48 @@ +import Foundation +import Networking + +// MARK: - ResponseValidationErrorModel + +/// An Response validation error returned from an API request. +/// +public struct ResponseValidationErrorModel: Codable, Equatable { + // MARK: Properties + + /// A string that represents the error code. + public let error: String + + /// A string that provides a description of the error. + public let errorDescription: String? + + /// An `ErrorModel` object that provides more details about the error. + public let errorModel: ErrorModel + + /// Public instance of synthesized initializer. + public init(error: String, errorDescription: String?, errorModel: ErrorModel) { + self.error = error + self.errorDescription = errorDescription + self.errorModel = errorModel + } +} + +public struct ErrorModel: Codable, Equatable { + // MARK: Properties + + /// A string that provides a message about the error. + public let message: String + + /// A string that represents an object associated with the error. + public let object: String + + /// Public instance of synthesized initializer. + public init(message: String, object: String) { + self.message = message + self.object = object + } +} + +// MARK: JSONResponse + +extension ResponseValidationErrorModel: JSONResponse { + public static let decoder = JSONDecoder.pascalOrSnakeCaseDecoder +} diff --git a/BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift b/BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift similarity index 97% rename from BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift rename to BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift index 169e78d8d..36175a0e4 100644 --- a/BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift +++ b/BitwardenKit/Core/Auth/Models/Response/ResponseValidationErrorModelTests.swift @@ -1,7 +1,8 @@ +import BitwardenKitMocks import TestHelpers import XCTest -@testable import BitwardenShared +@testable import BitwardenKit // MARK: - ResponseValidationErrorModelTests diff --git a/BitwardenKit/Core/Auth/Services/API/Account/Fixtures/APITestData+Account.swift b/BitwardenKit/Core/Auth/Services/API/Account/Fixtures/APITestData+Account.swift index 31621295f..01117b0a4 100644 --- a/BitwardenKit/Core/Auth/Services/API/Account/Fixtures/APITestData+Account.swift +++ b/BitwardenKit/Core/Auth/Services/API/Account/Fixtures/APITestData+Account.swift @@ -137,7 +137,3 @@ public extension APITestData { bundle: BitwardenKitMocksBundleFinder.bundle ) } - -class BitwardenKitMocksBundleFinder { - static let bundle = Bundle(for: BitwardenKitMocksBundleFinder.self) -} diff --git a/BitwardenShared/Core/Platform/Services/API/Errors/ServerError.swift b/BitwardenKit/Core/Platform/Services/API/Errors/ServerError.swift similarity index 90% rename from BitwardenShared/Core/Platform/Services/API/Errors/ServerError.swift rename to BitwardenKit/Core/Platform/Services/API/Errors/ServerError.swift index d783f7795..3cb08fd12 100644 --- a/BitwardenShared/Core/Platform/Services/API/Errors/ServerError.swift +++ b/BitwardenKit/Core/Platform/Services/API/Errors/ServerError.swift @@ -1,11 +1,10 @@ -import BitwardenKit import Foundation // MARK: - ServerError /// An enumeration of server errors. /// -enum ServerError: Error, Equatable, CustomNSError { +public enum ServerError: Error, Equatable, CustomNSError { /// A generic error. /// /// - Parameter errorResponse: The error response returned from the API request. @@ -19,7 +18,7 @@ enum ServerError: Error, Equatable, CustomNSError { case validationError(validationErrorResponse: ResponseValidationErrorModel) /// A computed property that returns an error message based on the case. - var message: String { + public var message: String { switch self { case let .error(errorResponse): errorResponse.singleMessage() diff --git a/BitwardenKit/Core/Platform/Services/API/Fixtures/APITestData+Error.swift b/BitwardenKit/Core/Platform/Services/API/Fixtures/APITestData+Error.swift new file mode 100644 index 000000000..c0c355b5f --- /dev/null +++ b/BitwardenKit/Core/Platform/Services/API/Fixtures/APITestData+Error.swift @@ -0,0 +1,11 @@ +import Foundation +import TestHelpers + +public extension APITestData { + /// A standard Bitwarden error message of "You do not have permissions to edit this." + static let bitwardenErrorMessage = loadFromJsonBundle( + resource: "BitwardenErrorMessage", + bundle: BitwardenKitMocksBundleFinder.bundle + ) +} + diff --git a/AuthenticatorShared/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json b/BitwardenKit/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json similarity index 100% rename from AuthenticatorShared/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json rename to BitwardenKit/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json diff --git a/BitwardenKit/Core/Platform/Services/API/Fixtures/BitwardenKitMocksBundleFinder.swift b/BitwardenKit/Core/Platform/Services/API/Fixtures/BitwardenKitMocksBundleFinder.swift new file mode 100644 index 000000000..de8b9a5bf --- /dev/null +++ b/BitwardenKit/Core/Platform/Services/API/Fixtures/BitwardenKitMocksBundleFinder.swift @@ -0,0 +1,5 @@ +import Foundation + +class BitwardenKitMocksBundleFinder { + static let bundle = Bundle(for: BitwardenKitMocksBundleFinder.self) +} diff --git a/AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift b/BitwardenKit/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift similarity index 60% rename from AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift rename to BitwardenKit/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift index a5df808b5..d75781a9e 100644 --- a/AuthenticatorShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift +++ b/BitwardenKit/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift @@ -1,15 +1,21 @@ -import BitwardenKit import Networking // MARK: - ResponseValidationError /// An error indicating that the response was invalid and didn't contain a successful HTTP status code. /// -struct ResponseValidationError: Error, Equatable { +public struct ResponseValidationError: Error, Equatable { // MARK: Properties /// The received HTTP response. - let response: HTTPResponse + public let response: HTTPResponse + + // MARK: Initializers + + /// Public version of synthesized initializer. + public init(response: HTTPResponse) { + self.response = response + } } // MARK: - ResponseValidationHandler @@ -17,8 +23,17 @@ struct ResponseValidationError: Error, Equatable { /// A `ResponseHandler` that validates that HTTP responses contain successful (2XX) HTTP status /// codes or tries to parse the error otherwise. /// -class ResponseValidationHandler: ResponseHandler { - func handle(_ response: inout HTTPResponse) async throws -> HTTPResponse { +public final class ResponseValidationHandler: ResponseHandler { + /// Public version of synthesized initializer. + public init() {} + + /// Handles receiving a `HTTPResponse`. The handler can view or modify the response before + /// returning it to continue to handler chain. + /// + /// - Parameter response: The `HTTPResponse` that was received by the `HTTPClient`. + /// - Returns: The original or modified `HTTPResponse`. + /// + public func handle(_ response: inout HTTPResponse) async throws -> HTTPResponse { guard (200 ..< 300).contains(response.statusCode) else { // If the response can be parsed, throw an error containing the response message. if let errorResponse = try? ErrorResponseModel(response: response) { diff --git a/BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift b/BitwardenKit/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift similarity index 97% rename from BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift rename to BitwardenKit/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift index 8534ba5b4..b61ebc04a 100644 --- a/BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift +++ b/BitwardenKit/Core/Platform/Services/API/Handlers/ResponseValidationHandlerTests.swift @@ -1,9 +1,8 @@ -import BitwardenKit import Networking import TestHelpers import XCTest -@testable import BitwardenShared +@testable import BitwardenKit class ResponseValidationHandlerTests: BitwardenTestCase { // MARK: Properties diff --git a/BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModel.swift b/BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModel.swift deleted file mode 100644 index 8f40cab77..000000000 --- a/BitwardenShared/Core/Auth/Models/Response/ResponseValidationErrorModel.swift +++ /dev/null @@ -1,35 +0,0 @@ -import Foundation -import Networking - -// MARK: - ResponseValidationErrorModel - -/// An Response validation error returned from an API request. -/// -struct ResponseValidationErrorModel: Codable, Equatable { - // MARK: Properties - - /// A string that represents the error code. - let error: String - - /// A string that provides a description of the error. - let errorDescription: String? - - /// An `ErrorModel` object that provides more details about the error. - let errorModel: ErrorModel -} - -struct ErrorModel: Codable, Equatable { - // MARK: Properties - - /// A string that provides a message about the error. - let message: String - - /// A string that represents an object associated with the error. - let object: String -} - -// MARK: JSONResponse - -extension ResponseValidationErrorModel: JSONResponse { - static let decoder = JSONDecoder.pascalOrSnakeCaseDecoder -} diff --git a/BitwardenShared/Core/Platform/Extensions/Error+Networking.swift b/BitwardenShared/Core/Platform/Extensions/Error+Networking.swift index 7414cd543..a53563ce4 100644 --- a/BitwardenShared/Core/Platform/Extensions/Error+Networking.swift +++ b/BitwardenShared/Core/Platform/Extensions/Error+Networking.swift @@ -1,3 +1,4 @@ +import BitwardenKit import Foundation public extension Error { diff --git a/BitwardenShared/Core/Platform/Extensions/ErrorNetworkingTests.swift b/BitwardenShared/Core/Platform/Extensions/ErrorNetworkingTests.swift index fbbde0236..a5a06e2c0 100644 --- a/BitwardenShared/Core/Platform/Extensions/ErrorNetworkingTests.swift +++ b/BitwardenShared/Core/Platform/Extensions/ErrorNetworkingTests.swift @@ -1,4 +1,5 @@ import BitwardenKit +import BitwardenKitMocks import Networking import TestHelpers import XCTest diff --git a/BitwardenShared/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json b/BitwardenShared/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json deleted file mode 100644 index 7d4604db8..000000000 --- a/BitwardenShared/Core/Platform/Services/API/Fixtures/BitwardenErrorMessage.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "message": "You do not have permissions to edit this.", - "validationErrors": null, - "exceptionMessage": null, - "exceptionStackTrace": null, - "innerExceptionMessage": null, - "object": "error" -} diff --git a/BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift b/BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift deleted file mode 100644 index 2ac4bf181..000000000 --- a/BitwardenShared/Core/Platform/Services/API/Handlers/ResponseValidationHandler.swift +++ /dev/null @@ -1,38 +0,0 @@ -import BitwardenKit -import Networking - -// MARK: - ResponseValidationError - -/// An error indicating that the response was invalid and didn't contain a successful HTTP status code. -/// -struct ResponseValidationError: Error, Equatable { - // MARK: Properties - - /// The received HTTP response. - let response: HTTPResponse -} - -// MARK: - ResponseValidationHandler - -/// A `ResponseHandler` that validates that HTTP responses contain successful (2XX) HTTP status -/// codes or tries to parse the error otherwise. -/// -final class ResponseValidationHandler: ResponseHandler { - func handle(_ response: inout HTTPResponse) async throws -> HTTPResponse { - guard (200 ..< 300).contains(response.statusCode) else { - // If the response can be parsed, throw an error containing the response message. - if let errorResponse = try? ErrorResponseModel(response: response) { - throw ServerError.error(errorResponse: errorResponse) - } - - // If the response can be parsed, throw an error containing the response message. - if let validationErrorResponse = try? ResponseValidationErrorModel(response: response) { - throw ServerError.validationError(validationErrorResponse: validationErrorResponse) - } - - // Otherwise, throw a generic response validation error. - throw ResponseValidationError(response: response) - } - return response - } -} diff --git a/BitwardenShared/UI/Auth/PasswordHint/PasswordHintProcessorTests.swift b/BitwardenShared/UI/Auth/PasswordHint/PasswordHintProcessorTests.swift index 2b8c52e39..97a39851c 100644 --- a/BitwardenShared/UI/Auth/PasswordHint/PasswordHintProcessorTests.swift +++ b/BitwardenShared/UI/Auth/PasswordHint/PasswordHintProcessorTests.swift @@ -1,3 +1,4 @@ +import BitwardenKit import Networking import XCTest diff --git a/BitwardenShared/UI/Platform/Application/Extensions/Alert+Networking.swift b/BitwardenShared/UI/Platform/Application/Extensions/Alert+Networking.swift index 5a58877c8..eca55150b 100644 --- a/BitwardenShared/UI/Platform/Application/Extensions/Alert+Networking.swift +++ b/BitwardenShared/UI/Platform/Application/Extensions/Alert+Networking.swift @@ -1,3 +1,4 @@ +import BitwardenKit import BitwardenSdk import Foundation diff --git a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/DeleteAccount/DeleteAccountProcessor.swift b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/DeleteAccount/DeleteAccountProcessor.swift index 35852c2d7..f4e9f292b 100644 --- a/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/DeleteAccount/DeleteAccountProcessor.swift +++ b/BitwardenShared/UI/Platform/Settings/Settings/AccountSecurity/DeleteAccount/DeleteAccountProcessor.swift @@ -1,3 +1,4 @@ +import BitwardenKit import BitwardenSdk // MARK: - DeleteAccountProcessor diff --git a/BitwardenShared/UI/Platform/Settings/Settings/Vault/ExportVault/ExportVaultToFile/ExportVaultProcessor.swift b/BitwardenShared/UI/Platform/Settings/Settings/Vault/ExportVault/ExportVaultToFile/ExportVaultProcessor.swift index 67d76d438..08d27153e 100644 --- a/BitwardenShared/UI/Platform/Settings/Settings/Vault/ExportVault/ExportVaultToFile/ExportVaultProcessor.swift +++ b/BitwardenShared/UI/Platform/Settings/Settings/Vault/ExportVault/ExportVaultToFile/ExportVaultProcessor.swift @@ -1,3 +1,4 @@ +import BitwardenKit import BitwardenSdk import Foundation diff --git a/TestHelpers/API/APITestData.swift b/TestHelpers/API/APITestData.swift index 31f81cc55..ea2f14490 100644 --- a/TestHelpers/API/APITestData.swift +++ b/TestHelpers/API/APITestData.swift @@ -22,8 +22,3 @@ public struct APITestData { loadFromBundle(resource: resource, extension: "json", bundle: bundle) } } - -public extension APITestData { - /// A standard Bitwarden error message of "You do not have permissions to edit this." - static let bitwardenErrorMessage = loadFromJsonBundle(resource: "BitwardenErrorMessage") -}