fix: point native trigger error hints at the account picker and the shared account

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
hugocasa
2026-10-16 14:36:10 +02:00
co-authored by Claude Opus 5.5
parent e361399ea2
commit 18c404556e
5 changed files with 8 additions and 8 deletions
@@ -866,7 +866,7 @@ fn test_provider_rejection_is_readable_and_not_internal() {
"the envelope should not reach the user: {message}"
);
assert!(
message.contains("Workspace settings > Integrations"),
message.contains("the workspace's shared account"),
"the hint should say what to do: {message}"
);
}
@@ -334,7 +334,7 @@ impl External for GitHub {
fn error_hint(&self, status: StatusCode) -> Option<&'static str> {
match status {
StatusCode::UNAUTHORIZED => {
Some("reconnect the GitHub integration from Workspace settings > Integrations.")
Some("reconnect the GitHub account this uses from the account picker.")
}
StatusCode::FORBIDDEN => Some(
"check that the OAuth app is authorized for the organization and that the \
@@ -227,7 +227,7 @@ impl External for Google {
fn error_hint(&self, status: http::StatusCode) -> Option<&'static str> {
match status {
http::StatusCode::UNAUTHORIZED => {
Some("reconnect the Google integration from Workspace settings > Integrations.")
Some("reconnect the Google account this uses from the account picker.")
}
http::StatusCode::FORBIDDEN => Some(
"the connected Google account is missing access to this resource or the scope the \
@@ -351,13 +351,13 @@ impl External for NextCloud {
fn error_hint(&self, status: StatusCode) -> Option<&'static str> {
match status {
StatusCode::UNAUTHORIZED => {
Some("reconnect the Nextcloud integration from Workspace settings > Integrations.")
Some("reconnect the Nextcloud account this uses from the account picker.")
}
StatusCode::FORBIDDEN => Some(
"Nextcloud grants webhook management to administrators only, and a Windmill \
admin is a different thing. If the connected Nextcloud account is not an admin \
there and holds no delegated admin rights for the Webhooks setting, reconnect \
the integration from Workspace settings > Integrations with one that does.",
there and holds no delegated admin rights for the Webhooks setting, use one that \
does, such as the workspace's shared account.",
),
_ => None,
}
@@ -1170,8 +1170,8 @@ async fn set_workspace_connection(
tx.commit().await?;
Ok(Json(match path {
Some(path) => format!("{path} is now the workspace connection"),
None => "No workspace connection".to_string(),
Some(path) => format!("{path} is now the shared account"),
None => "No shared account".to_string(),
}))
}