summaryrefslogtreecommitdiffhomepage
path: root/ios/MullvadREST/MullvadAPI/APIRequest/APIError.swift
blob: f62fde619ace1461b1c39ac2810c2a2efc2e6241 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
//
//  APIError.swift
//  MullvadVPN
//
//  Created by Jon Petersson on 2025-02-24.
//  Copyright © 2025 Mullvad VPN AB. All rights reserved.
//

public struct APIError: Error, Codable, Sendable {
    public let statusCode: Int
    public let errorDescription: String
    public let serverResponseCode: String?

    public init(statusCode: Int, errorDescription: String, serverResponseCode: String?) {
        self.statusCode = statusCode
        self.errorDescription = errorDescription
        self.serverResponseCode = serverResponseCode
    }
}