Skip to content
Back

Does Appwrite return platform errors instead of authentication errors?

  • 0
  • Android
  • Flutter
  • Cloud
pewpewpewpew
30 Jan, 2025, 07:56

Hello,

I have an issue where Appwrite returns a platform error instead of an authentication error. Is this normal?

Link: https://appwrite.io/docs/advanced/platform/response-codes

Here is my example code:

TypeScript
Future<void> signIn(String email, String password) async {
    try {
      await _account.createEmailPasswordSession(
          email: email, password: password
      );
    } on AppwriteException catch (e) {
      print(e);
      rethrow;
    }
  }

Return

TypeScript
AppwriteException: general_argument_invalid, Invalid `password` param: Password must be between 8 and 256 characters long. (400)`

Thanks.

TL;DR
Appwrite is returning platform errors instead of authentication errors due to an invalid password (too short). Refer to the platform response codes documentation for more details. Consider checking password requirements and adjust accordingly.
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