ExceptionMiddleware discards the QuickConnect 409 message, so the actionable text never ships #36
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up from #18 / PR #34. Tracking: #12.
Problem
A refused quick-connect claim throws
ConflictExceptionwith actionable text — "Request is being authorized elsewhere, or an earlier attempt to authorize it did not complete. Start quick connect again for a new code." — which tells the user the one thing that resolves it.QuickConnectController.cs:120-127lets it fall through to the middleware, andExceptionMiddleware.cs:95-97replaces the body with"Error processing request."outside Development. The status is right (409); the text never reaches a client.QuickConnectStatusCodeTests.Authorize_AfterAMintThatFailed_...asserts the message on the exception object, and its middleware harness (Environments.Production) asserts only the status — so the tested behaviour is not the shipped behaviour.The 404 leg already does this correctly:
NotFound("Unknown secret").Proposal
Catch
ConflictExceptioninQuickConnectController.AuthorizeQuickConnectand returnConflict(ex.Message), mirroring how the 404 leg returns its message. Add the missingProducesResponseTypefor 404 onAuthorizeQuickConnectwhile there — it is the documented way out of a burned claim.Acceptance