Also display erroneous PGP keys
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
nemunaire 2022-09-20 00:52:25 +02:00
parent 16d7fe4beb
commit 57d37544f9
3 changed files with 30 additions and 3 deletions

View file

@ -126,8 +126,7 @@ func declareAPIAuthKeysRoutes(router *gin.RouterGroup) {
k := c.MustGet("key").(*Key)
if err := k.ReadInfos(u); err != nil {
log.Println("Unable to ReadInfos:", err)
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": "Unable to read your public key. Please try again in a few moment."})
c.AbortWithStatusJSON(http.StatusInternalServerError, gin.H{"errmsg": fmt.Sprintf("Unable to read your public key: %s", err.Error())})
return
}