ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
137 stars 85 forks source link

UpdateRecoveryFlowWithHttpInfoAsync does not return cookies on completion due to an exception being thrown #294

Open thomasFarley1991 opened 10 months ago

thomasFarley1991 commented 10 months ago

Preflight checklist

Ory Network Project

No response

Describe the bug

The UpdateRecoveryFlowWithHttpInfoAsync returns a status of 422 when I responds to redirect the browser to the settings flow.

However because the default exception factory throws an exception for anything with a code > 400 the cookies do not get returned. This means you cannot continue with the settings journey as you have no ory session.

Reproducing the bug

  1. CreateBrowserRecoveryFlowWithHttpInfoAsync (code method)
  2. UpdateRecoveryFlowWithHttpInfoAsync (with email)
  3. UpdateRecoveryFlowWithHttpInfoAsync (with code to complete)
  4. Completed flow returns an exception with no cookies.
  5. Redirect to settings ui
  6. Can't get settings flow as no ory session cookie

Relevant log output

No response

Relevant configuration

No response

Version

1.2.9

On which operating system are you observing this issue?

macOS / dotnet SDK

In which environment are you deploying?

None

Additional Context

No response

jonas-jonas commented 10 months ago

Thanks! Likely requires an update to the generator, or we provide a custom exception factory.