Also display erroneous PGP keys
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
16d7fe4beb
commit
57d37544f9
3 changed files with 30 additions and 3 deletions
3
keys.go
3
keys.go
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Reference in a new issue