From 9d3655edba0da6dc51c5fe25a43340bcec693039 Mon Sep 17 00:00:00 2001 From: Dion Gionet Mallet Date: Tue, 4 Jun 2024 09:48:00 -0400 Subject: [PATCH] chore(entry_user_credential): updated error messages --- internal/provider/entry_user_credential_data_source.go | 4 ++-- internal/provider/entry_user_credential_resource.go | 10 +++++----- internal/provider/entry_validators.go | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/internal/provider/entry_user_credential_data_source.go b/internal/provider/entry_user_credential_data_source.go index 3330341..4eb960a 100644 --- a/internal/provider/entry_user_credential_data_source.go +++ b/internal/provider/entry_user_credential_data_source.go @@ -113,13 +113,13 @@ func (d *EntryUserCredentialDataSource) Read(ctx context.Context, req datasource entryusercredential, err := d.client.Entries.UserCredential.Get(data.Id.ValueString()) if err != nil { - resp.Diagnostics.AddError("unable to read entryusercredential", err.Error()) + resp.Diagnostics.AddError("unable to read user credential entry", err.Error()) return } entryusercredential, err = d.client.Entries.UserCredential.GetUserAuthDetails(entryusercredential) if err != nil { - resp.Diagnostics.AddError("unable to read entryusercredential sensitive information", err.Error()) + resp.Diagnostics.AddError("unable to read user credential entry sensitive information", err.Error()) return } diff --git a/internal/provider/entry_user_credential_resource.go b/internal/provider/entry_user_credential_resource.go index 6523d5b..b6b212e 100644 --- a/internal/provider/entry_user_credential_resource.go +++ b/internal/provider/entry_user_credential_resource.go @@ -121,7 +121,7 @@ func (r *EntryUserCredentialResource) Create(ctx context.Context, req resource.C entryusercredential, err := r.client.Entries.UserCredential.New(entryusercredential) if err != nil { - resp.Diagnostics.AddError("unable to create entryusercredential", err.Error()) + resp.Diagnostics.AddError("unable to create user credential entry", err.Error()) return } @@ -147,13 +147,13 @@ func (r *EntryUserCredentialResource) Read(ctx context.Context, req resource.Rea resp.State.RemoveResource(ctx) return } - resp.Diagnostics.AddError("unable to read entryusercredential", err.Error()) + resp.Diagnostics.AddError("unable to read user credential entry", err.Error()) return } entryusercredential, err = r.client.Entries.UserCredential.GetUserAuthDetails(entryusercredential) if err != nil { - resp.Diagnostics.AddError("unable to read entryusercredential sensitive information", err.Error()) + resp.Diagnostics.AddError("unable to read user credential entry sensitive information", err.Error()) return } @@ -175,7 +175,7 @@ func (r *EntryUserCredentialResource) Update(ctx context.Context, req resource.U _, err := r.client.Entries.UserCredential.Update(entryusercredential) if err != nil { - resp.Diagnostics.AddError("unable to update entryusercredential", err.Error()) + resp.Diagnostics.AddError("unable to update user credential entry", err.Error()) return } @@ -196,7 +196,7 @@ func (r *EntryUserCredentialResource) Delete(ctx context.Context, req resource.D resp.State.RemoveResource(ctx) return } - resp.Diagnostics.AddError("unable to delete entryusercredential", err.Error()) + resp.Diagnostics.AddError("unable to delete user credential entry", err.Error()) return } } diff --git a/internal/provider/entry_validators.go b/internal/provider/entry_validators.go index 60f11b2..35e1350 100644 --- a/internal/provider/entry_validators.go +++ b/internal/provider/entry_validators.go @@ -10,7 +10,7 @@ import ( type entryusercredentialIdValidator struct{} func (validator entryusercredentialIdValidator) Description(_ context.Context) string { - return "entryusercredential must be a valid UUID (ex.: 00000000-0000-0000-0000-000000000000)" + return "user credential entry must be a valid UUID (ex.: 00000000-0000-0000-0000-000000000000)" } func (validator entryusercredentialIdValidator) MarkdownDescription(ctx context.Context) string { @@ -26,7 +26,7 @@ func (d entryusercredentialIdValidator) ValidateString(_ context.Context, reques _, err := uuid.Parse(id) if err != nil { - response.Diagnostics.AddError("entryusercredential id is not a valid UUID (ex.: 00000000-0000-0000-0000-000000000000)", err.Error()) + response.Diagnostics.AddError("user credential entry id is not a valid UUID (ex.: 00000000-0000-0000-0000-000000000000)", err.Error()) return } }