title: How to use FirebaseAuth error codes?
body: <p>I'm trying to use the <code>AuthErrorCode</code> in Firebase but I keep getting errors. Here is my code:</p>
  
  <pre><code>private func handleErrors(err: NSError, loginHandler: LoginHandler?) {
  
      if let errCode = AuthErrorCode(rawValue: err.code) {
  
          switch errCode {
  
          case .errorCodeWrongPassword:  //Enum case 'errorCodeWrongPassword' not found in type 'AuthErrorCode'
              loginHandler?(LoginErrorCode.WRONG_PASSWORD)
              break
  
          case .errorCodeInvalidEmail:  //Enum case 'errorCodeInvalidEmail' not found in type 'AuthErrorCode'
              loginHandler?(LoginErrorCode.INVALID_EMAIL)
              break
  
          case .errorCodeUserNotFound:  //Enum case 'errorCodeUserNotFound' not found in type 'AuthErrorCode'
              loginHandler?(LoginErrorCode.USER_NOT_FOUND)
              break
  
          case .errorCodeEmailAlreadyInUse:  //Enum case 'errorCodeEmailAlreadyInUse' not found in type 'AuthErrorCode'
              loginHandler?(LoginErrorCode.EMAIL_ALREADY_IN_USE)
              break
  
          case .errorCodeWeakPassword:  //Enum case 'errorCodeWeakPassword' not found in type 'AuthErrorCode'
              loginHandler?(LoginErrorCode.WEAK_PASSWORD)
              break
  
          default:
              loginHandler?(LoginErrorCode.PROBLEM_CONNECTING)
              break
  
          }
  
      }
  
  }
  </code></pre>
  
  <p>Anyone know what I'm doing wrong? If you didn't see the errors in my code here they are:</p>
  
  <pre><code>Enum case 'errorCodeWrongPassword' not found in type 'AuthErrorCode'
  
  Enum case 'errorCodeInvalidEmail' not found in type 'AuthErrorCode'
  
  Enum case 'errorCodeUserNotFound' not found in type 'AuthErrorCode'
  
  Enum case 'errorCodeEmailAlreadyInUse' not found in type 'AuthErrorCode'
  
  Enum case 'errorCodeWeakPassword' not found in type 'AuthErrorCode'
  </code></pre>
  
  <p>Let me know if you guys have any ideas!</p>