Improve error handling when user has no zenodo access token

This commit is contained in:
George Kalampokis 2021-08-02 18:31:10 +03:00
parent 6a2099c2b9
commit 4e87bd270e
1 changed files with 1 additions and 1 deletions

View File

@ -167,7 +167,7 @@ public class UserManager {
try { try {
this.updateDOIToken(ZenodoAccessType.REFRESH_TOKEN, principal.getZenodoRefresh(), this.environment.getProperty("zenodo.login.redirect_uri"), principal); this.updateDOIToken(ZenodoAccessType.REFRESH_TOKEN, principal.getZenodoRefresh(), this.environment.getProperty("zenodo.login.redirect_uri"), principal);
return true; return true;
}catch (IOException e) { }catch (Exception e) {
this.deleteDOIToken(principal); this.deleteDOIToken(principal);
throw new ExpiredTokenException("Zenodo Token is expired."); throw new ExpiredTokenException("Zenodo Token is expired.");
} }