Surface Confluence auth errors and clarify Cloud token format (1.1.0)#9
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #7. The plugin previously accepted a bare API token in the settings field and threw the API response body as an
ApplicationExceptionthat 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.ConfluenceSearchClientnow callsEnsureSuccessStatusCode, so failures surface asHttpRequestExceptionwith the actual status code instead of being mapped to an opaqueApplicationException, and the response is allowed to be null on empty payload.Searchercatches that and shows an explicitConfluence authentication failed (HTTP 401)result on 401 — the subtitle asks the user whether they pasted the token asemail@example.com:apitokenand the row clicks through to the README configuration section. Other status codes produce a genericConfluence request failed (HTTP <code>)hint instead of an empty list.API Token (Cloud: email:token).email:tokenformat for Cloud and that Server / Data Center installs still take the token alone.Also as part of this release:
mastertomainso pushes to the default branch actually cut releases. Bumpingplugin.json:Versiononmainnow produces av<Version>tag and attaches the published ZIP automatically.CLAUDE.mdanddocs/DEVELOPMENT.md.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 existingWhenApiReturnsError_ThrowsApplicationExceptionwas rewritten asWithHttpError_ThrowsHttpRequestExceptionCarryingStatusCode, and a 401-specific case was added.Publish Releaseworkflow runs againstmain, buildsConfluenceSearch-1.1.0.zip, and creates av1.1.0GitHub release with the ZIP attached.Auto Updaterun picks upv1.1.0for the Confluence Search entry.email:prefix, and works once the format is corrected.