🐛 Bug Report: type '_Map<String, dynamic>' is not a subtype of type 'List<dynamic>' #41
Closed
2 tasks done
Labels
bug
Something isn't working
👟 Reproduction steps
While creating collection, some combination of permissions causes server to respond with a wrong type for "permissions" which leads to SDK crash.
https://github.com/appwrite/sdk-for-dart/blob/master/lib/src/models/collection.dart#L12 and https://github.com/appwrite/sdk-for-dart/blob/master/lib/src/models/collection.dart#L44
Wrong response:
{"$id":"category","$createdAt":"2023-06-08T12:45:14.832+00:00","$updatedAt":"2023-06-08T12:45:14.832+00:00","$permissions":{"0":
👍 Expected behavior
SDK should handle both response types array and object OR server should be consistent with a response structure.
👎 Actual Behavior
SDK handles response only while permissions field is an array.
🎲 Appwrite version
Different version (specify in environment)
💻 Operating system
Linux
🧱 Your Environment
Local selfohosted appwrite 1.3.4
👀 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: