Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible error in ErrorBrowserLocationChangeRequired interface #302

Open
5 tasks done
tildadavillglas opened this issue Nov 13, 2023 · 0 comments
Open
5 tasks done
Labels
bug Something is not working.

Comments

@tildadavillglas
Copy link

tildadavillglas commented Nov 13, 2023

Preflight checklist

Ory Network Project

No response

Describe the bug

Hello,

I believe there might be an error with how the ErrorBrowserLocationChangeRequired Typescript interface in the API SDK (for Typescript) is defined. Shouldn't it contain a GenericError instead of an ErrorGeneric, like other errors that can arise when fetching a flow?

That interface seems to be generated from here (relevant lines of code linked) and/or here in the Ory API SDK.

It's possible that I have misunderstood something about how these errors work, if so I apologize!

Reproducing the bug

Compare the documentation of errors associated with getting flows for user-facing self https://www.ory.sh/self-service/errors:

{
  error: {
    id: "browser_location_change_required",
    code: 422,
    status: "Unprocessable Entity",
    reason: "In order to complete this flow please redirect the browser to: /ui/login?flow=ad574ad7-1a3c-4b52-9f54-ef9e866f3cec",
    message: "browser location change required",
  },
  redirect_browser_to: "/ui/login?flow=ad574ad7-1a3c-4b52-9f54-ef9e866f3cec",
}

with the ErrorBrowserLocationChangeRequired Typescript interface that would look something like this implemented:

{
error: {
    error: {
        id: "browser_location_change_required",
        code: 422,
        status: "Unprocessable Entity",
        reason: "In order to complete this flow please redirect the browser to: /ui/login?flow=ad574ad7-1a3c-4b52-9f54-ef9e866f3cec",
        message: "browser location change required",
    },
    redirect_browser_to: "/ui/login?flow=ad574ad7-1a3c-4b52-9f54-ef9e866f3cec",
}

Relevant log output

None

Relevant configuration

None

Version

1.0.0 (@ory/kratos-client)

On which operating system are you observing this issue?

None

In which environment are you deploying?

None

Additional Context

No response

@tildadavillglas tildadavillglas added the bug Something is not working. label Nov 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something is not working.
Projects
None yet
Development

No branches or pull requests

1 participant