 
 extension API {
     public enum Error: Swift.Error {
+        case networkFailed(Swift.Error)
         case decodingFailed(DecodeError)
     }
 }

    case addEntry

    public func request(forCompany company: String) -> URLRequest {
        let baseURL = URL(string: "https://\(company).harvestapp.com/")!

        var request = URLRequest(url: baseURL.appendingPathComponent(path))
        request.httpMethod = method.rawValue


    public let company: String
    private let auth: HTTPBasicAuth

    private let sessionManager: SessionManager

    public init(company: String, auth: HTTPBasicAuth) {
        self.company = company
        self.auth = auth

        let configuration = URLSessionConfiguration.default
        let authorizationHeader = DataRequest.authorizationHeader(
            user: auth.username,
            password: auth.password
        )!

        configuration.httpAdditionalHeaders = [
            "Accept": "application/json",
            authorizationHeader.key: authorizationHeader.value,
        ]

        self.sessionManager = SessionManager(configuration: configuration)
    }

    public func user(handler: @escaping APIType.UserHandler) {
        let request = Router.whoami.request(forCompany: company)
        self.request(request)
            .responseJSON { response in
                guard let json = response.result.value else {
                    handler(.failure(.networkFailed(response.result.error!)))

                    return
                }

                let decoded: Decoded<Model.User> = decode(json)

                switch decoded {
