When I try to throw to exception from onFailure method Android Studio forces me to add try catch block and not allowing to throw exception to calling function.
protected void createUser(final UserRegister user) throws ApiException, RuntimeException {
Call call = dbApi.registerUserAsync(user, new ApiCallback<UserRegistered>() {
@Override
public void onFailure(ApiException e, int i, Map<String, List<String>> map) {
Timber.e("Exception in createUser: " + e.getMessage());
throw e;
}