You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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?
👟 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?
🏢 Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: