Skip to content

🐛 Bug Report: (Apple SDK) "type" is not present in AppWriteError  #41

@IvanBogdantsev

Description

@IvanBogdantsev

👟 Reproduction steps

Hello,

I don't get how to localize errors returned from AppWrite. The only things present in AppwriteError instance are code and message. The "type" is always nil.

So, if I am not mistaken the only way to provide users with accurate error description is to localize errors based on the "message" property..?

If so, then we will get something like

//...
switch error.message {
case "Invalid email : please provide valid email": return "something localized"
case ...//
}

If so, this is not okay. I still hope though that this could be done easily and I did not get how to do that because I am new to AppWrite

P.S. this question was raised in AppWrite Discord and I got confirmation from Steven (@drake) that there is indeed problem is extracting "type"

👍 Expected behavior

"type" not nil

👎 Actual Behavior

"type" is nil

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

MacOS

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions