36 lines
1.1 KiB
Swift
36 lines
1.1 KiB
Swift
//
|
|
// Exception.swift
|
|
// Befund
|
|
//
|
|
// Created by Irakli Abetschkhrischwili on 26.05.22.
|
|
// Copyright © 2022 MVZ Dr. Stein und Kollegen. All rights reserved.
|
|
|
|
import Foundation
|
|
|
|
extension Core.Models.Response
|
|
{
|
|
struct Exception : Encodable, Decodable
|
|
{
|
|
public var error_type: Int = Exception.Types.NONE
|
|
public var message: String? = nil
|
|
|
|
/**
|
|
* Type of response exception
|
|
*/
|
|
struct Types
|
|
{
|
|
public static let NONE: Int = 0
|
|
public static let InvalidClient: Int = 1000
|
|
public static let InvalidRequest: Int = 1001
|
|
public static let MissingArgument: Int = 1002
|
|
public static let InvalidArgument: Int = 1003
|
|
public static let Unknown: Int = 1004
|
|
public static let AlreadySubscribted: Int = 1005
|
|
public static let NotAuthorized: Int = 1007
|
|
public static let MaxOpenedRequestLimit: Int = 1008
|
|
public static let NotAvailable: Int = 1009
|
|
public static let WrongFileChecksum: Int = 1010
|
|
}
|
|
}
|
|
}
|