Last active
August 15, 2019 13:08
-
-
Save wbbernardes/1760a8fe63a4d02dacde7ec05b62cf17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Error+enum.swift | |
// | |
// Created by Wesley Brito on 12/07/19. | |
// Copyright © 2019 Wesley Brito. All rights reserved. | |
// | |
import Foundation | |
enum RequestErrors: String { | |
case noInternet | |
case unexpectedError | |
case facebookLoginFailed | |
case googleLoginFailed | |
case invalidCredentials | |
case authError | |
var message: String { | |
switch self { | |
case .noInternet: | |
return "Check your Internet connection\nPull to refresh" | |
case .unexpectedError: | |
return "Erro ao recuperar os recuperar dados, tente novamente." | |
case .facebookLoginFailed: | |
return "Erro para efetuar login com o Facebook !" | |
case .googleLoginFailed: | |
return "Erro para efetuar login com o Google !" | |
case .invalidCredentials: | |
return "Dados inválidos, refaça a operação !" | |
case .authError: | |
return "Erro na autenticação, por favor refaça a operação" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment