Skip to content

Commit

Permalink
fix: do not expose debug in a response when a schema is not found (or…
Browse files Browse the repository at this point in the history
…y#2348)

Co-authored-by: hackerman <[email protected]>
  • Loading branch information
sawadashota and aeneasr authored Mar 29, 2022
1 parent c50767c commit 80fd5e4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions schema/handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (
"os"
"strings"

"github.com/ory/kratos/driver/config"
"github.com/ory/x/urlx"

"github.com/ory/kratos/driver/config"

"github.com/julienschmidt/httprouter"
"github.com/pkg/errors"

Expand Down Expand Up @@ -105,7 +106,7 @@ func (h *Handler) getByID(w http.ResponseWriter, r *http.Request, ps httprouter.

s, err = ss.GetByID(id)
if err != nil {
h.r.Writer().WriteError(w, r, errors.WithStack(herodot.ErrNotFound.WithDebugf("%+v", err)))
h.r.Writer().WriteError(w, r, errors.WithStack(herodot.ErrNotFound.WithReasonf("Identity schema `%s` could not be found.", id)))
return
}
}
Expand Down

0 comments on commit 80fd5e4

Please sign in to comment.