Skip to content
Snippets Groups Projects
Verified Commit 654933cf authored by Gabriel Zachmann's avatar Gabriel Zachmann
Browse files

improve ssh info error handling

parent 32100c69
Branches
Tags
No related merge requests found
...@@ -41,6 +41,7 @@ func HandleGetSSHInfo(ctx *fiber.Ctx) error { ...@@ -41,6 +41,7 @@ func HandleGetSSHInfo(ctx *fiber.Ctx) error {
ctx, nil, &reqMytoken, api.CapabilitySSHGrantRead, &api.EventSSHKeyListed, "", fiber.StatusOK, ctx, nil, &reqMytoken, api.CapabilitySSHGrantRead, &api.EventSSHKeyListed, "", fiber.StatusOK,
func(tx *sqlx.Tx, mt *mytoken.Mytoken) (my.TokenUpdatableResponse, *model.Response) { func(tx *sqlx.Tx, mt *mytoken.Mytoken) (my.TokenUpdatableResponse, *model.Response) {
info, err := sshrepo.GetAllSSHInfo(rlog, tx, mt.ID) info, err := sshrepo.GetAllSSHInfo(rlog, tx, mt.ID)
_, err = db.ParseError(err)
if err != nil { if err != nil {
rlog.Errorf("%s", errorfmt.Full(err)) rlog.Errorf("%s", errorfmt.Full(err))
return nil, model.ErrorToInternalServerErrorResponse(err) return nil, model.ErrorToInternalServerErrorResponse(err)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment