Skip to content
Back

[SOLVED] Type attribute missing in AppwriteError (Cloud, 1.4.3)

  • 1
  • Apple
  • Cloud
dch09
24 Sep, 2023, 12:58
TypeScript
â–¿ Invalid credentials. Please check the email and password. #0
  - message: "Invalid credentials. Please check the email and password."
  â–¿ code: Optional(401)
    - some: 401
  - type: nil

that's the printed out error thrown when creating email session with incorrect credentials.

I've checked few other examples and type attribute, which is an optional String in AppwriteError class is also nil.

TL;DR
The user encountered a missing type attribute issue in the AppwriteError class while using Appwrite Cloud version 1.4.3. They updated to version 4.0.1 and the issue was resolved. The user also shared their code snippet, where they caught the error and printed its attributes. The type attribute was shown as nil. The user mentioned that they were able to reproduce the issue on version 1.3x but not on 1.4x. The team has been notified about the issue.
safwan
24 Sep, 2023, 13:06

I've passed this to the team

dch09
24 Sep, 2023, 13:06

Cool 🙌

darShan
24 Sep, 2023, 13:27

Appwrite & SDK version?

darShan
24 Sep, 2023, 13:28

I can reproduce this on 1.3x but not on 1.4x.

dch09
24 Sep, 2023, 13:28

sdk - 4.0.0 appwrite - 1.4.3

darShan
24 Sep, 2023, 13:29

Can you try 4.0.1?

darShan
24 Sep, 2023, 13:35

Here's what I'm doing -

TypeScript
do {
  let account = Account(client)
  let _ = try await account.createEmailSession(email: "user@xyz.com", password: "qwerty@12345!!") // wrong password
} catch let appwriteError as AppwriteError {
  print([appwriteError.message, appwriteError.code!, appwriteError.type!])
}

// Output:
// ["Invalid credentials. Please check the email and password.", 401, "user_invalid_credentials"]
dch09
24 Sep, 2023, 13:37

Well... updating to 4.0.1 fixed the issue! 🥳

dch09
24 Sep, 2023, 13:37

Thanks!

D5
24 Sep, 2023, 13:43

[SOLVED] Type attribute missing in AppwriteError (Cloud, 1.4.3)

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more