Added Type, Category and Signatories on task
This commit is contained in:
@@ -14,7 +14,8 @@ String? extractSupabaseError(dynamic res) {
|
||||
return err is Map ? (err['message'] ?? err.toString()) : err.toString();
|
||||
}
|
||||
if (res['status'] != null && res['status'] is int && res['status'] >= 400) {
|
||||
return res['message']?.toString() ?? 'Request failed with status ${res['status']}';
|
||||
return res['message']?.toString() ??
|
||||
'Request failed with status ${res['status']}';
|
||||
}
|
||||
return null;
|
||||
}
|
||||
@@ -22,7 +23,9 @@ String? extractSupabaseError(dynamic res) {
|
||||
// Try PostgrestResponse-like fields via dynamic access (safe within try/catch).
|
||||
try {
|
||||
final err = (res as dynamic).error;
|
||||
if (err != null) return err is Map ? (err['message'] ?? err.toString()) : err.toString();
|
||||
if (err != null) {
|
||||
return err is Map ? (err['message'] ?? err.toString()) : err.toString();
|
||||
}
|
||||
} catch (_) {}
|
||||
try {
|
||||
final status = (res as dynamic).status;
|
||||
|
||||
Reference in New Issue
Block a user