Skip to content

Commit

Permalink
Merge pull request #977 from larsgrefer/fix/issueCreation
Browse files Browse the repository at this point in the history
Fix issue creation for non-collaborators
  • Loading branch information
Meisolsson committed Jan 24, 2016
2 parents 44bf049 + 5c97163 commit abbd8c7
Showing 1 changed file with 10 additions and 0 deletions.
Expand Up @@ -50,6 +50,7 @@

import java.util.List;

import retrofit.RetrofitError;
import rx.android.schedulers.AndroidSchedulers;
import rx.schedulers.Schedulers;

Expand Down Expand Up @@ -389,6 +390,15 @@ public void onNext(Boolean isCollaborator) {
if (isCollaborator)
showCollaboratorOptions();
}

@Override
public void onError(Throwable e) {
if(e instanceof RetrofitError && ((RetrofitError) e).getResponse().getStatus() == 403){
//403 -> Forbidden
//The user is not a collaborator.
showMainContent();
}
}
});
}
}

0 comments on commit abbd8c7

Please sign in to comment.