Checks that error is not null and status code is equal to 200 or less than 400 and greater than 200
bool get isSuccessful => error == null && code >= 200 && code < 400;