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

Create env returns an empty exception and doesn't create the new env #42

Open
nirorlev opened this issue May 23, 2023 · 2 comments
Open

Comments

@nirorlev
Copy link

The Permit object is initialized with the 'org' or 'project' keys.
When I try to perform --> permit.api.environments.create(project-key, {name: "test"}) --> the response is an empty exception.

@asafc
Copy link
Contributor

asafc commented May 23, 2023

Hi @nirorlev :)
I'm looking into it.

@asafc
Copy link
Contributor

asafc commented Jun 11, 2023

Hi @nirorlev can you please try this:

const permit = new Permit({
    token: '<ORG level api key>',
    pdp: process.env.PDP_URL || 'http://localhost:7766',
    log: {
      level: 'debug',
    },
});
const environment: EnvironmentRead = await permit.api.environments.create(
    'test-node-proj',
    { key: 'my-node-env', name: 'My Node Env' },
);

this is tested now e2e (check out this test), so if it's not working it's a config issue and I can try and help you figure that out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants