Added option to add reactions to talk messages
This commit is contained in:
@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user