From df7e457567af6fd6508ad8a0d2bf684c187a59ab Mon Sep 17 00:00:00 2001 From: Xav Paice Date: Tue, 26 May 2026 21:47:34 +1200 Subject: [PATCH] add error handle for onepassword service account failure --- dagger/secret.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dagger/secret.go b/dagger/secret.go index aa3a8188..13bfb4d9 100644 --- a/dagger/secret.go +++ b/dagger/secret.go @@ -24,6 +24,9 @@ func mustGetItemUUID(ctx context.Context, opServiceAccount *dagger.Secret, itemN onepassword.WithServiceAccountToken(opServiceAccountPlaintext), onepassword.WithIntegrationInfo("Dagger Workflow", "v0.0.1"), ) + if err != nil { + panic(err) + } items, err := client.Items.ListAll(ctx, string(vault)) if err != nil { @@ -91,6 +94,9 @@ func mustGetNonSensitiveSecret(ctx context.Context, opServiceAccount *dagger.Sec onepassword.WithServiceAccountToken(opServiceAccountPlaintext), onepassword.WithIntegrationInfo("Dagger Workflow", "v0.0.1"), ) + if err != nil { + panic(err) + } onePasswordURI := fmt.Sprintf("op://%s/%s/%s", vault, opItemUUID, field) item, err := client.Secrets.Resolve(context.Background(), onePasswordURI)