Skip to content

fix: properly reset ephemeral state in case of error#170

Merged
svenjacobs merged 1 commit intomainfrom
fix/error-reset-ephemeral-state
Sep 5, 2025
Merged

fix: properly reset ephemeral state in case of error#170
svenjacobs merged 1 commit intomainfrom
fix/error-reset-ephemeral-state

Conversation

@svenjacobs
Copy link
Owner

The ephemeral flow state wasn't properly resetted to null in case an error occurred during response handling.

@svenjacobs svenjacobs self-assigned this Sep 5, 2025
Copilot AI review requested due to automatic review settings September 5, 2025 09:53
@svenjacobs svenjacobs added the bug Something isn't working label Sep 5, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes a bug where ephemeral flow state wasn't properly reset to null when an error occurred during response handling in the authentication flow.

  • Introduces proper state finalization using AuthFlowStateFinalizer in error scenarios
  • Adds comprehensive test coverage for the AuthFlowUserAgentResponseHandler class
  • Refactors test utilities to support better test setup and reusability

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
AuthFlowUserAgentResponseHandler.kt Fixes error handling to properly reset ephemeral state using AuthFlowStateFinalizer
AuthFlowUserAgentResponseHandlerTest.kt Adds new test file with comprehensive coverage for response handler scenarios
LokksmithTest.kt Refactors test utilities to be reusable across test files

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@svenjacobs svenjacobs merged commit 9003398 into main Sep 5, 2025
7 checks passed
@svenjacobs svenjacobs deleted the fix/error-reset-ephemeral-state branch September 5, 2025 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants