-
Notifications
You must be signed in to change notification settings - Fork 2
How to Resolve Issues in Fineract SDK
Aditya Gupta edited this page Jan 30, 2025
·
2 revisions
If you encounter data type errors while using the Fineract SDK, there's no need to modify the SDK client directly. Instead, you can resolve the issue by modifying the model class in the Fineract-client-kmp.
- Navigate to the Fineract-client-kmp repository.
- Go to the src folder, where the models are located.
- Search for the specific model class that is throwing the data type error.
- Once you locate the model, you'll find the properties or fields of the class.
- Change the data type of the field to the appropriate type.
Let’s say you're getting an error related to a String type in a model but it should be an Integer. Here's how you can fix it:
data class UserModel(
userId: string; // Error: Type 'string' is not assignable to type 'number'.
username: string;
email: string;
)
data class UserModel(
userId: number; // Fixed the type to 'number'.
username: string;
email: string;
)
- Always ensure that the data type you're changing it to matches the expected structure and constraints of the API or database you're working with.
- This change only affects the Fineract Client package, so the SDK client remains unaffected.
By making this adjustment directly in the model class, you can avoid issues without needing to touch the SDK code itself.