Skip to content

Commit 55a0fd0

Browse files
committed
DON'T PANIC
1 parent a4f93c5 commit 55a0fd0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

enterprise/coderd/coderd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,9 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
7272
// This is a fatal error.
7373
var derr *dbcrypt.DecryptFailedError
7474
if xerrors.As(err, &derr) {
75-
panic(`Coder has shut down to prevent data corruption: your configured database is encrypted with an unknown external token encryption key. Please check your configuration and try again.`)
75+
return nil, xerrors.Errorf("database encrypted with unknown key, either add the key or see https://coder.com/docs/v2/latest/admin/encryption#disabling-encryption: %w", derr)
7676
}
77-
return nil, xerrors.Errorf("init dbcrypt: %w", err)
77+
return nil, xerrors.Errorf("init database encryption: %w", err)
7878
}
7979
options.Database = cryptDB
8080
}

0 commit comments

Comments
 (0)