appwrite / sdk-for-flutter

[READ-ONLY] Official Appwrite Flutter SDK 💙
https://appwrite.io
BSD 3-Clause "New" or "Revised" License
369 stars 110 forks source link

🐛 Bug Report: Server Error code 500 when create new document #177

Closed samderlust closed 1 year ago

samderlust commented 1 year ago

👟 Reproduction steps

When I try to create new document it throw an error with code 500 appwrite: ^11.0.0

flutter version

Flutter 3.13.4 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 367f9ea16b (11 days ago) • 2023-09-12 23:27:53 -0500
Engine • revision 9064459a8b
Tools • Dart 3.1.2 • DevTools 2.25.0
  final response = await _ref.read(appWriteDBProvider).createDocument(
            databaseId: 'xx',
            collectionId: 'xxx',
            documentId: ID.unique(),
            data: payload.toJson(),
          );

👍 Expected behavior

create new document

👎 Actual Behavior

flutter: \^[[38;5;196m│ ⛔ {<…>
flutter: \^[[38;5;196m│ ⛔   "message": "Server Error",<…>
flutter: \^[[38;5;196m│ ⛔   "code": 500,<…>
flutter: \^[[38;5;196m│ ⛔   "type": "general_unknown",<…>
flutter: \^[[38;5;196m│ ⛔   "version": "0.11.3"<…>
flutter: \^[[38;5;196m│ ⛔ }<…>

🎲 Appwrite version

Version 2.0.x

💻 Operating system

Linux

🧱 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?

samderlust commented 1 year ago

I found out that I send a wrong attribute to the server