Skip to content

Commit

Permalink
jwk: improve error message of wrong system secrect
Browse files Browse the repository at this point in the history
closes #104
  • Loading branch information
Aeneas Rekkas (arekkas) committed Jul 24, 2016
1 parent 5e5282c commit dd77eb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jwk/manager_rethinkdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import (
"github.com/square/go-jose"
"golang.org/x/net/context"
r "gopkg.in/dancannon/gorethink.v2"
"fmt"
)

type RethinkManager struct {
Expand Down Expand Up @@ -239,7 +240,7 @@ func (m *RethinkManager) ColdStart() error {
for clients.Next(&raw) {
pt, err := m.Cipher.Decrypt(raw.Key)
if err != nil {
return errors.New(err)
return errors.New(fmt.Sprintf("Could not decrypt JSON Web Keys because: %s. This usually happens when a wrong system secret is being used", err.Error()))
}

if err := json.Unmarshal(pt, &key); err != nil {
Expand Down

0 comments on commit dd77eb9

Please sign in to comment.