diff --git a/app/src/main/java/com/example/sprout/refactor/repository/RegistrationRepository.java b/app/src/main/java/com/example/sprout/refactor/repository/RegistrationRepository.java index 0f41a14..16ae86f 100644 --- a/app/src/main/java/com/example/sprout/refactor/repository/RegistrationRepository.java +++ b/app/src/main/java/com/example/sprout/refactor/repository/RegistrationRepository.java @@ -20,6 +20,7 @@ private RegistrationService registrationService = null; private Subject registrationSubject = PublishSubject.create().toSerialized(); + private Subject registrationErrorSubject = PublishSubject.create().toSerialized(); public RegistrationRepository() { this.registrationService = new Retrofit @@ -46,12 +47,16 @@ registrationSubject.onNext(account); }, error -> { - System.out.println("error"); - // TODO:error handling + System.out.println("hogehoge"); + registrationErrorSubject.onNext(error); }); } public Observable getRegistrationObservable() { return registrationSubject.hide(); } + + public Observable getRegistrationErrorObservable() { + return registrationErrorSubject.hide(); + } } \ No newline at end of file