Accept more exception errors from the API

This commit is contained in:
Roland Geider
2021-02-18 23:17:41 +01:00
parent 6ab9cef5d8
commit ce3eff0304

View File

@@ -55,8 +55,12 @@ void showHttpExceptionErrorDialog(WgerHttpException exception, BuildContext cont
errorList.add(Text(key, style: TextStyle(fontWeight: FontWeight.bold)));
// Error messages
for (var value in exception.errors[key]) {
errorList.add(Text(value));
if (exception.errors[key] is String) {
errorList.add(Text(exception.errors[key]));
} else {
for (var value in exception.errors[key]) {
errorList.add(Text(value));
}
}
errorList.add(SizedBox(height: 8));
}