Improve error handling when user has no zenodo access token
This commit is contained in:
parent
6a2099c2b9
commit
4e87bd270e
|
@ -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.");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue