Add support for manual edit of KES configuration file (#2354)
Signed-off-by: Lenin Alevski <alevsk.8772@gmail.com>
This commit is contained in:
@@ -162,6 +162,10 @@ func ErrorWithContext(ctx context.Context, err ...interface{}) *models.Error {
|
||||
errorCode = 404
|
||||
errorMessage = ErrSSENotConfigured.Error()
|
||||
}
|
||||
if errors.Is(err1, ErrEncryptionConfigNotFound) {
|
||||
errorCode = 404
|
||||
errorMessage = err1.Error()
|
||||
}
|
||||
// account change password
|
||||
if errors.Is(err1, ErrChangePassword) {
|
||||
errorCode = 403
|
||||
|
||||
@@ -82,7 +82,7 @@ func TestError(t *testing.T) {
|
||||
"ErrUnableToUpdateTenantCertificates": {code: 500, err: ErrUnableToUpdateTenantCertificates},
|
||||
"ErrUpdatingEncryptionConfig": {code: 500, err: ErrUpdatingEncryptionConfig},
|
||||
"ErrDeletingEncryptionConfig": {code: 500, err: ErrDeletingEncryptionConfig},
|
||||
"ErrEncryptionConfigNotFound": {code: 500, err: ErrEncryptionConfigNotFound},
|
||||
"ErrEncryptionConfigNotFound": {code: 404, err: ErrEncryptionConfigNotFound},
|
||||
}
|
||||
|
||||
for k, e := range appErrors {
|
||||
|
||||
Reference in New Issue
Block a user