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

bug: Create Org Role Endpoint, fails when organization Scope is not valid, but creates the organization #6891

Open
2 of 4 tasks
FernandoNarvaez1904 opened this issue Dec 18, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@FernandoNarvaez1904
Copy link

FernandoNarvaez1904 commented Dec 18, 2024

Describe the bug

When creating a new Organization role with the Management API, if a not valid organization-scope is passed, the error 402 is returned (According to the docs this error only means that the org name is duplicated). But even if the error is being returned, the organization role is being created.

Expected behavior

I expect that if a non-valid organization-scope is given. It happens one of the following:

  1. The endpoint returns an error code, and the role is not creted
  2. The endpoint returns a 201, and the role is created only with the valid scopes

How to reproduce?

Context

  • Logto Cloud
  • Self-hosted, Logto version =
    • Container (Docker image)
    • Raw Node.js
@FernandoNarvaez1904 FernandoNarvaez1904 added the bug Something isn't working label Dec 18, 2024
@darcyYe
Copy link
Contributor

darcyYe commented Dec 19, 2024

Thanks for reporting, fixing this in PR#6894.

@darcyYe darcyYe self-assigned this Dec 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

No branches or pull requests

2 participants