error
construction with fmt.Errorf
SCC-S1028167func authorize(c *fiber.Ctx, app *app, user *User) error {
168 authz, ok := app.getIssuer()
169 if !ok {
170 return c.Status(http.StatusUnauthorized).JSON(ErrorBody(errors.New(fmt.Sprintf("app %s: cannot get issuer", app.name)), nil))171 }
172
173 payload, err := NewIssuerPayload(user.AsMap())
Error construction could be simplified by using fmt.Errorf(…)
errors.New(fmt.Sprintf(...))
fmt.Errorf(...)