Skip to content

Surface Confluence auth errors and clarify Cloud token format (1.1.0)#9

Merged
haugjan merged 1 commit into
mainfrom
fix/cloud-auth-clarity
May 1, 2026
Merged

Surface Confluence auth errors and clarify Cloud token format (1.1.0)#9
haugjan merged 1 commit into
mainfrom
fix/cloud-auth-clarity

Conversation

@haugjan

@haugjan haugjan commented May 1, 2026

Copy link
Copy Markdown
Owner

Summary

Fixes #7. The plugin previously accepted a bare API token in the settings field and threw the API response body as an ApplicationException that bubbled up to Flow Launcher and produced an empty result list, so a Confluence Cloud user who pasted only the token (which is what the README example showed) saw "No results" with no indication that auth was failing. Mirrors the Jira-side fix at haugjan/Flow.JiraSearch#17.

  • ConfluenceSearchClient now calls EnsureSuccessStatusCode, so failures surface as HttpRequestException with the actual status code instead of being mapped to an opaque ApplicationException, and the response is allowed to be null on empty payload.
  • Searcher catches that and shows an explicit Confluence authentication failed (HTTP 401) result on 401 — the subtitle asks the user whether they pasted the token as email@example.com:apitoken and the row clicks through to the README configuration section. Other status codes produce a generic Confluence request failed (HTTP <code>) hint instead of an empty list.
  • Settings panel relabels the field to API Token (Cloud: email:token).
  • README explains the email:token format for Cloud and that Server / Data Center installs still take the token alone.

Also as part of this release:

  • Fix publish workflow trigger from master to main so pushes to the default branch actually cut releases. Bumping plugin.json:Version on main now produces a v<Version> tag and attaches the published ZIP automatically.
  • Drop the resolved master-vs-main wrinkle from CLAUDE.md and docs/DEVELOPMENT.md.
  • Bumps version to 1.1.0.

Test plan

  • dotnet build Flow.ConfluenceSearch.sln -c Debug — clean, no warnings.
  • dotnet run --project Flow.ConfluenceSearch.Test --no-build — 43/43 pass. The existing WhenApiReturnsError_ThrowsApplicationException was rewritten as WithHttpError_ThrowsHttpRequestExceptionCarryingStatusCode, and a 401-specific case was added.
  • On merge, the Publish Release workflow runs against main, builds ConfluenceSearch-1.1.0.zip, and creates a v1.1.0 GitHub release with the ZIP attached.
  • After the manifest PR (Fix UrlSourceCode for Jira Search and Confluence Search to unblock auto-updater Flow-Launcher/Flow.Launcher.PluginsManifest#652) is merged, the next scheduled Auto Update run picks up v1.1.0 for the Confluence Search entry.
  • Manual smoke test on Confluence Cloud after release: plugin shows the auth-error hint when the token is missing the email: prefix, and works once the format is corrected.

Fixes #7. The plugin previously accepted a bare API token in the
settings field and threw the API response body as an ApplicationException
that bubbled up to Flow Launcher and produced an empty result list, so a
Confluence Cloud user who pasted only the token (which is what the README
example showed) saw "No results" with no indication that auth was
failing.

- ConfluenceSearchClient now calls EnsureSuccessStatusCode, so failures
  surface as HttpRequestException with the actual status code instead of
  being mapped to an opaque ApplicationException, and the response is
  allowed to be null on empty payload.
- Searcher catches that and shows an explicit
  "Confluence authentication failed (HTTP 401)" result on 401 -- the
  subtitle asks the user whether they pasted the token as
  email@example.com:apitoken and the row clicks through to the README
  configuration section. Other status codes produce a generic
  "Confluence request failed (HTTP <code>)" hint instead of an empty
  list.
- Settings panel relabels the field to
  "API Token (Cloud: email:token)".
- README explains the email:token format for Cloud and that Server /
  Data Center installs still take the token alone.

Also as part of this release:

- Fix publish workflow trigger from master to main so pushes to the
  default branch actually cut releases. Bumping plugin.json:Version on
  main now produces a v<Version> tag and attaches the published ZIP
  automatically.
- Drop the resolved master-vs-main wrinkle from CLAUDE.md and
  docs/DEVELOPMENT.md.
- Bumps version to 1.1.0.
@haugjan haugjan merged commit 7e7ec74 into main May 1, 2026
1 check passed
@haugjan haugjan deleted the fix/cloud-auth-clarity branch May 1, 2026 11:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot Search Confluence

1 participant