Added option to add reactions to talk messages

This commit is contained in:
2023-07-09 19:38:09 +02:00
parent 0b2fab5b6d
commit 2ddaa17a81
9 changed files with 188 additions and 11 deletions

View File

@ -42,9 +42,11 @@ abstract class TalkApi<T> extends ApiRequest {
try {
data = await request(endpoint, body, headers);
if(data == null) throw Exception();
if(data == null) throw Exception("No response Data");
if(data.statusCode >= 400 || data.statusCode < 200) throw Exception("Response status code '${data.statusCode}' might indicate an error");
} catch(e) {
throw ApiError("Request could not be dispatched!");
log(e.toString());
throw ApiError("Request could not be dispatched: ${e.toString()}");
}
//dynamic jsonData = jsonDecode(data.body);