Persisted file order options

This commit is contained in:
2023-06-19 14:13:56 +02:00
parent 53f1cdcda5
commit 28c98de9a7
5 changed files with 31 additions and 3 deletions

View File

@ -38,8 +38,12 @@ abstract class TalkApi<T> extends ApiRequest {
headers?.putIfAbsent("Accept", () => "application/json");
headers?.putIfAbsent("OCS-APIRequest", () => "true");
http.Response? data = await request(endpoint, body, headers);
if(data == null) {
http.Response? data;
try {
data = await request(endpoint, body, headers);
if(data == null) throw Exception();
} catch(e) {
throw ApiError("Request could not be dispatched!");
}
//dynamic jsonData = jsonDecode(data.body);