Skip to content

Commit

Permalink
fix the secret error message for windows profile (#25171)
Browse files Browse the repository at this point in the history
relates to #25155

fixes an issue where we weren't showing an error message for a windows
profile with incorrect secret

<!-- Note that API documentation changes are now addressed by the
product design team. -->

- [x] Manual QA for all new/changed functionality
  • Loading branch information
ghernandez345 authored Jan 6, 2025
1 parent e0d0e80 commit 8cbc57b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/pages/SoftwarePage/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,11 @@ export const generateSecretErrMsg = (err: unknown) => {
}

if (errorType === "profile") {
return reason
.split(":")[1]
// for profiles we can get two different error messages. One contains a colon
// and the other doesn't. We need to handle both cases.
const message = reason.split(":").pop() ?? "";

return message
.replace(/Secret variables?/i, "Variable")
.replace("missing from database", "doesn't exist.");
}
Expand Down

0 comments on commit 8cbc57b

Please sign in to comment.