fromResponse static method
Parse an error response from the PowerSync service
Implementation
static SyncResponseException fromResponse(http.Response response) {
try {
final body = response.body;
return _fromResponseBody(response, body);
} on Exception catch (_) {
// Could be FormatException, or possibly other exceptions.
// Fallback to just using the response header.
return _fromResponseHeader(response);
}
}