Skip to content

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

Open
@FernandoNarvaez1904

Description

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

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions